autoretrieve

package
v0.3.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2022 License: Apache-2.0, MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Autoretrieve

type Autoretrieve struct {
	gorm.Model

	Handle            string `gorm:"unique"`
	Token             string `gorm:"unique"`
	LastConnection    time.Time
	LastAdvertisement time.Time
	PubKey            string `gorm:"unique"`
	Addresses         string
}

func (*Autoretrieve) AddrInfo added in v0.2.0

func (autoretrieve *Autoretrieve) AddrInfo() (*peer.AddrInfo, error)

type AutoretrieveInitResponse

type AutoretrieveInitResponse struct {
	Handle            string         `json:"handle"`
	Token             string         `json:"token"`
	LastConnection    time.Time      `json:"lastConnection"`
	AddrInfo          *peer.AddrInfo `json:"addrInfo"`
	AdvertiseInterval string         `json:"advertiseInterval"`
}

type AutoretrieveListResponse

type AutoretrieveListResponse struct {
	Handle            string         `json:"handle"`
	LastConnection    time.Time      `json:"lastConnection"`
	LastAdvertisement time.Time      `json:"lastAdvertisement"`
	AddrInfo          *peer.AddrInfo `json:"addrInfo"`
}

type HeartbeatAutoretrieveResponse

type HeartbeatAutoretrieveResponse struct {
	Handle            string         `json:"handle"`
	LastConnection    time.Time      `json:"lastConnection"`
	LastAdvertisement time.Time      `json:"lastAdvertisement"`
	AddrInfo          *peer.AddrInfo `json:"addrInfo"`
	AdvertiseInterval string         `json:"advertiseInterval"`
}

type Iterator added in v0.2.0

type Iterator struct {
	// contains filtered or unexported fields
}

func NewIterator added in v0.2.0

func NewIterator(db *gorm.DB, firstContentID uint, count uint) (*Iterator, error)

func (*Iterator) Next added in v0.2.0

func (iter *Iterator) Next() (multihash.Multihash, error)

type Provider added in v0.2.0

type Provider struct {
	// contains filtered or unexported fields
}

func NewProvider added in v0.2.0

func NewProvider(db *gorm.DB, advertisementInterval time.Duration, indexerURL string, advertiseOffline bool) (*Provider, error)

func (*Provider) Run added in v0.2.0

func (provider *Provider) Run(ctx context.Context) error

func (*Provider) Stop added in v0.2.0

func (provider *Provider) Stop() error

type PublishedBatch added in v0.2.0

type PublishedBatch struct {
	gorm.Model

	FirstContentID     uint
	Count              uint
	AutoretrieveHandle string
}

A batch that has been published for a specific autoretrieve

func (PublishedBatch) TableName added in v0.2.0

func (PublishedBatch) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL