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: 11 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

	PinnerMultiaddr string
	IpfsMaddrs      []multiaddr.Multiaddr

	DaemonFrequency        time.Duration
	ExportMetricsFrequency time.Duration

	TargetSectorSize       int64
	BatchMinSize           int64
	BatchMinWaiting        time.Duration
	BatchWaitScalingFactor int64

	CARUploader  packer.CARUploader
	CARExportURL string
}

Config defines params for Service configuration.

type Service

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

Service is a gRPC service wrapper around an packer.

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) OnReadyToBatch

func (s *Service) OnReadyToBatch(ctx context.Context, opID mbroker.OperationID, srs []mbroker.ReadyToBatchData) error

OnReadyToBatch process a message for data ready to be included in a batch.

Jump to

Keyboard shortcuts

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