client

package
v2.0.4-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CdnClient

type CdnClient interface {
	ObtainSeeds(ctx context.Context, sr *cdnsystem.SeedRequest, opts ...grpc.CallOption) (*PieceSeedStream, error)

	GetPieceTasks(ctx context.Context, addr dfnet.NetAddr, req *base.PieceTaskRequest, opts ...grpc.CallOption) (*base.PiecePacket, error)

	SyncPieceTasks(ctx context.Context, addr dfnet.NetAddr, ptr *base.PieceTaskRequest, opts ...grpc.CallOption) (cdnsystem.Seeder_SyncPieceTasksClient, error)

	UpdateState(addrs []dfnet.NetAddr)

	Close() error
}

CdnClient see cdnsystem.CdnClient

func GetClientByAddr

func GetClientByAddr(addrs []dfnet.NetAddr, opts ...grpc.DialOption) CdnClient

func GetElasticClientByAddrs

func GetElasticClientByAddrs(addrs []dfnet.NetAddr, opts ...grpc.DialOption) (CdnClient, error)

type PieceSeedStream

type PieceSeedStream struct {
	rpc.RetryMeta
	// contains filtered or unexported fields
}

func (*PieceSeedStream) Recv

func (pss *PieceSeedStream) Recv() (ps *cdnsystem.PieceSeed, err error)

Jump to

Keyboard shortcuts

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