server

package
v2.0.5-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: Apache-2.0 Imports: 11 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(daemonServer DaemonServer, opts ...grpc.ServerOption) *grpc.Server

Types

type DaemonServer

type DaemonServer interface {
	// Download triggers client to download file
	Download(context.Context, *dfdaemon.DownRequest, chan<- *dfdaemon.DownResult) error
	// GetPieceTasks get piece tasks from other peers
	GetPieceTasks(context.Context, *base.PieceTaskRequest) (*base.PiecePacket, error)
	// SyncPieceTasks sync piece tasks info with other peers
	SyncPieceTasks(dfdaemon.Daemon_SyncPieceTasksServer) error
	// CheckHealth check daemon health
	CheckHealth(context.Context) error
	// Check if the given task exists in P2P cache system
	StatTask(context.Context, *dfdaemon.StatTaskRequest) error
	// Import the given file into P2P cache system
	ImportTask(context.Context, *dfdaemon.ImportTaskRequest) error
	// Export or download file from P2P cache system
	ExportTask(context.Context, *dfdaemon.ExportTaskRequest) error
	// Delete file from P2P cache system
	DeleteTask(context.Context, *dfdaemon.DeleteTaskRequest) error
}

DaemonServer refer to dfdaemon.DaemonServer

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