Documentation ¶
Overview ¶
Package server implements GRPC-server upon gnetcli library.
Index ¶
- Variables
- func BuildCreds(login, password string, enableAgent bool, logger *zap.Logger) credentials.Credentials
- func BuildEmptyCreds(logger *zap.Logger) credentials.Credentials
- func MakeFileResult(path string, file streamer.File) *pb.FileData
- type Auth
- type MultiTrace
- type MultiTraceImp
- type Option
- type Server
- func (m *Server) AddDevice(ctx context.Context, device *pb.Device) (*pb.DeviceResult, error)
- func (m *Server) Download(ctx context.Context, req *pb.FileDownloadRequest) (*pb.FilesResult, error)
- func (m *Server) Exec(ctx context.Context, cmd *pb.CMD) (*pb.CMDResult, error)
- func (m *Server) ExecChat(stream pb.Gnetcli_ExecChatServer) error
- func (m *Server) SetupHostParams(ctx context.Context, hostParams *pb.HostParams) (*emptypb.Empty, error)
- func (m *Server) Upload(ctx context.Context, req *pb.FileUploadRequest) (*emptypb.Empty, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func BuildCreds ¶
func BuildCreds(login, password string, enableAgent bool, logger *zap.Logger) credentials.Credentials
func BuildEmptyCreds ¶ added in v1.0.1
func BuildEmptyCreds(logger *zap.Logger) credentials.Credentials
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func NewAuthInsecure ¶
func (*Auth) AuthenticateStream ¶
func (m *Auth) AuthenticateStream(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
func (*Auth) AuthenticateUnary ¶
func (m *Auth) AuthenticateUnary(ctx context.Context, req interface{}, servInfo *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
type MultiTraceImp ¶
type MultiTraceImp struct {
// contains filtered or unexported fields
}
func NewMultiTrace ¶
func NewMultiTrace() *MultiTraceImp
func (*MultiTraceImp) DelTrace ¶
func (m *MultiTraceImp) DelTrace(index int) error
func (*MultiTraceImp) List ¶
func (m *MultiTraceImp) List() []gtrace.Item
type Option ¶
type Option func(*Server)
func WithCredentials ¶
func WithCredentials(creds credentials.Credentials) Option
func WithLogger ¶
type Server ¶
type Server struct { pb.UnimplementedGnetcliServer // contains filtered or unexported fields }
func (*Server) Download ¶ added in v1.0.4
func (m *Server) Download(ctx context.Context, req *pb.FileDownloadRequest) (*pb.FilesResult, error)
func (*Server) SetupHostParams ¶ added in v1.0.4
Click to show internal directories.
Click to hide internal directories.