server

package
v2.0.3-beta.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v2.0.1

func New(seederServer SeederServer, opts ...grpc.ServerOption) *grpc.Server

func StatSeedFinish

func StatSeedFinish(taskID, url string, success bool, err error, startAt, finishAt time.Time, traffic, contentLength int64)

func StatSeedStart

func StatSeedStart(taskID, url string)

Types

type SeederServer

type SeederServer interface {
	// ObtainSeeds generate seeds and return to scheduler
	ObtainSeeds(context.Context, *cdnsystem.SeedRequest, chan<- *cdnsystem.PieceSeed) error
	// GetPieceTasks get piece tasks from cdn
	GetPieceTasks(context.Context, *base.PieceTaskRequest) (*base.PiecePacket, error)
	// SyncPieceTasks sync piece tasks info with other peers
	SyncPieceTasks(cdnsystem.Seeder_SyncPieceTasksServer) error
}

SeederServer refer to cdnsystem.SeederServer

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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