receiver

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Receiver

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

Receiver implements the gRPC of ReceiverService, responsible for receive replicate object payload data

func NewReceiverService

func NewReceiverService(config *ReceiverConfig) (*Receiver, error)

NewReceiverService return a Receiver instance and init the resource

func (*Receiver) Name

func (receiver *Receiver) Name() string

Name return the receiver service name, for the lifecycle management

func (*Receiver) QuerySyncingObject

func (receiver *Receiver) QuerySyncingObject(ctx context.Context, req *types.QuerySyncingObjectRequest) (
	resp *types.QuerySyncingObjectResponse, err error)

QuerySyncingObject query a syncing object info by object id.

func (*Receiver) Start

func (receiver *Receiver) Start(ctx context.Context) error

Start the receiver background goroutine

func (*Receiver) Stop

func (receiver *Receiver) Stop(ctx context.Context) error

Stop the receiver gRPC service and recycle the resources

func (*Receiver) SyncObject

func (receiver *Receiver) SyncObject(stream types.ReceiverService_SyncObjectServer) (err error)

SyncObject an object payload to storage provider.

type ReceiverConfig

type ReceiverConfig struct {
	SpOperatorAddress string
	GRPCAddress       string
	SignerGRPCAddress string
	SpDBConfig        *config.SQLDBConfig
	PieceStoreConfig  *storage.PieceStoreConfig
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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