client

package
v3.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetAddr() *nebula.HostAddr
	// dst file or dir should not exist
	UploadFile(req *pb.UploadFileRequest) (*pb.UploadFileResponse, error)
	IncrUploadFile(req *pb.IncrUploadFileRequest) (*pb.IncrUploadFileResponse, error)
	DownloadFile(req *pb.DownloadFileRequest) (*pb.DownloadFileResponse, error)
	StartService(req *pb.StartServiceRequest) (*pb.StartServiceResponse, error)
	StopService(req *pb.StopServiceRequest) (*pb.StopServiceResponse, error)
	ServiceStatus(req *pb.ServiceStatusRequest) (*pb.ServiceStatusResponse, error)
	BanReadWrite(req *pb.BanReadWriteRequest) (*pb.BanReadWriteResponse, error)
	AllowReadWrite(req *pb.AllowReadWriteRequest) (*pb.AllowReadWriteResponse, error)
	DataPlayBack(req *pb.DataPlayBackRequest) (*pb.DataPlayBackResponse, error)
	MoveDir(req *pb.MoveDirRequest) (*pb.MoveDirResponse, error)
	RemoveDir(req *pb.RemoveDirRequest) (*pb.RemoveDirResponse, error)
	ExistDir(req *pb.ExistDirRequest) (*pb.ExistDirResponse, error)
	StopAgent(req *pb.StopAgentRequest) (*pb.StopAgentResponse, error)
	HealthCheck(req *pb.HealthCheckRequest) (*pb.HealthCheckResponse, error)
	GetSpaceUsages(req *pb.GetSpaceUsagesRequest) (*pb.GetSpaceUsagesResponse, error)
	Close() error
}

Client is an agent client to call agent service It just handle session id and is a wrapper now, and will add more action in the future

func New

func New(ctx context.Context, cfg *Config) (Client, error)

type Config

type Config struct {
	Addr *nebula.HostAddr
}

Config is the agent client config

Jump to

Keyboard shortcuts

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