Documentation ¶
Index ¶
- Constants
- Variables
- func ShutdownGRPC() error
- func StartupGRPC()
- type GRPC
- func (g *GRPC) Download(value *wrapperspb.StringValue, fs pb.Thief_DownloadServer) error
- func (g *GRPC) Exec(ctx context.Context, req *pb.CmdRequest) (*pb.CmdResponse, error)
- func (g *GRPC) ListFile(data *wrapperspb.StringValue, fs pb.Thief_ListFileServer) error
- func (g *GRPC) MD5(ctx context.Context, value *wrapperspb.StringValue) (*wrapperspb.StringValue, error)
- func (g *GRPC) OpenFile(ctx context.Context, req *pb.FileRequest) (*wrapperspb.StringValue, error)
- func (g *GRPC) Upload(fs pb.Thief_UploadServer) error
- func (g *GRPC) Version(ctx context.Context, _ *emptypb.Empty) (*wrapperspb.StringValue, error)
Constants ¶
View Source
const (
DefaultSyncSizeLimit = 1024 * 1024 * 2
)
Variables ¶
View Source
var ( Host = "0.0.0.0" Port = 9091 BufferSize int64 = 1024 * 8 )
Functions ¶
func ShutdownGRPC ¶
func ShutdownGRPC() error
func StartupGRPC ¶
func StartupGRPC()
Types ¶
type GRPC ¶
type GRPC struct {
pb.UnimplementedThiefServer
}
func (*GRPC) Download ¶
func (g *GRPC) Download(value *wrapperspb.StringValue, fs pb.Thief_DownloadServer) error
func (*GRPC) Exec ¶
func (g *GRPC) Exec(ctx context.Context, req *pb.CmdRequest) (*pb.CmdResponse, error)
func (*GRPC) ListFile ¶
func (g *GRPC) ListFile(data *wrapperspb.StringValue, fs pb.Thief_ListFileServer) error
func (*GRPC) MD5 ¶
func (g *GRPC) MD5(ctx context.Context, value *wrapperspb.StringValue) (*wrapperspb.StringValue, error)
func (*GRPC) OpenFile ¶
func (g *GRPC) OpenFile(ctx context.Context, req *pb.FileRequest) (*wrapperspb.StringValue, error)
func (*GRPC) Version ¶
func (g *GRPC) Version(ctx context.Context, _ *emptypb.Empty) (*wrapperspb.StringValue, error)
Click to show internal directories.
Click to hide internal directories.