service

package
v0.0.0-...-269d6e4 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PostgresURI    string
	IpfsMultiaddrs []multiaddr.Multiaddr

	DaemonFrequency time.Duration
	RetryDelay      time.Duration
	PadToSize       uint64
}

Config defines params for Service configuration.

type Service

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

Service is a gRPC service wrapper around a piecer.

func New

func New(mb mbroker.MsgBroker, conf Config) (*Service, error)

New returns a new Service.

func (*Service) Close

func (s *Service) Close() error

Close the service.

func (*Service) OnNewBatchCreated

func (s *Service) OnNewBatchCreated(
	ctx context.Context,
	batchID broker.BatchID,
	batchCid cid.Cid,
	_ int64,
	_ []broker.StorageRequestID,
	_ string,
	_ []byte,
	_ *url.URL) error

OnNewBatchCreated handles messages for new-batch-created topic.

Jump to

Keyboard shortcuts

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