receiver

package
v0.1.1-dev-2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: GPL-3.0 Imports: 24 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) QueryReceivingObject added in v0.1.1

func (receiver *Receiver) QueryReceivingObject(ctx context.Context, req *types.QueryReceivingObjectRequest) (
	resp *types.QueryReceivingObjectResponse, err error)

QueryReceivingObject query a receiving object info by object id.

func (*Receiver) ReceiveObjectPiece added in v0.1.1

func (receiver *Receiver) ReceiveObjectPiece(stream types.ReceiverService_ReceiveObjectPieceServer) (err error)

ReceiveObjectPiece an object payload to storage provider.

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

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