autoretrieve

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 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 uint64, count uint64) (*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     uint64
	Count              uint64
	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