Documentation ¶
Index ¶
- Constants
- func PrintReply(reply *ExecuteReply)
- func RegisterRpcApiServer(s *grpc.Server, srv RpcApiServer)
- type Command
- type ExecuteReply
- func (*ExecuteReply) Descriptor() ([]byte, []int)
- func (m *ExecuteReply) GetResults() []*Result
- func (*ExecuteReply) ProtoMessage()
- func (m *ExecuteReply) Reset()
- func (m *ExecuteReply) String() string
- func (m *ExecuteReply) XXX_DiscardUnknown()
- func (m *ExecuteReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExecuteReply) XXX_Merge(src proto.Message)
- func (m *ExecuteReply) XXX_Size() int
- func (m *ExecuteReply) XXX_Unmarshal(b []byte) error
- type ExecuteRequest
- func (*ExecuteRequest) Descriptor() ([]byte, []int)
- func (m *ExecuteRequest) GetShells() []*Shell
- func (*ExecuteRequest) ProtoMessage()
- func (m *ExecuteRequest) Reset()
- func (m *ExecuteRequest) String() string
- func (m *ExecuteRequest) XXX_DiscardUnknown()
- func (m *ExecuteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExecuteRequest) XXX_Merge(src proto.Message)
- func (m *ExecuteRequest) XXX_Size() int
- func (m *ExecuteRequest) XXX_Unmarshal(b []byte) error
- type Result
- func (*Result) Descriptor() ([]byte, []int)
- func (m *Result) GetOutput() []byte
- func (*Result) ProtoMessage()
- func (m *Result) Reset()
- func (m *Result) String() string
- func (r *Result) Strings() []string
- func (m *Result) XXX_DiscardUnknown()
- func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Result) XXX_Merge(src proto.Message)
- func (m *Result) XXX_Size() int
- func (m *Result) XXX_Unmarshal(b []byte) error
- type RpcApiClient
- type RpcApiServer
- type Shell
- func (*Shell) Descriptor() ([]byte, []int)
- func (m *Shell) GetArgs() []string
- func (m *Shell) GetCmd() string
- func (m *Shell) GetIn() []byte
- func (*Shell) ProtoMessage()
- func (m *Shell) Reset()
- func (m *Shell) String() string
- func (s *Shell) ToNative() *nclib.Shell
- func (m *Shell) XXX_DiscardUnknown()
- func (m *Shell) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Shell) XXX_Merge(src proto.Message)
- func (m *Shell) XXX_Size() int
- func (m *Shell) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const LISTEN_PORT = 50081
Variables ¶
This section is empty.
Functions ¶
func PrintReply ¶
func PrintReply(reply *ExecuteReply)
func RegisterRpcApiServer ¶
func RegisterRpcApiServer(s *grpc.Server, srv RpcApiServer)
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
func (*Command) Client ¶
func (c *Command) Client() (RpcApiClient, *grpc.ClientConn, error)
type ExecuteReply ¶
type ExecuteReply struct { Results []*Result `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func NewExecuteReply ¶
func NewExecuteReply(results ...*Result) *ExecuteReply
func (*ExecuteReply) Descriptor ¶
func (*ExecuteReply) Descriptor() ([]byte, []int)
func (*ExecuteReply) GetResults ¶
func (m *ExecuteReply) GetResults() []*Result
func (*ExecuteReply) ProtoMessage ¶
func (*ExecuteReply) ProtoMessage()
func (*ExecuteReply) Reset ¶
func (m *ExecuteReply) Reset()
func (*ExecuteReply) String ¶
func (m *ExecuteReply) String() string
func (*ExecuteReply) XXX_DiscardUnknown ¶ added in v0.3.0
func (m *ExecuteReply) XXX_DiscardUnknown()
func (*ExecuteReply) XXX_Marshal ¶ added in v0.3.0
func (m *ExecuteReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExecuteReply) XXX_Merge ¶ added in v0.3.0
func (m *ExecuteReply) XXX_Merge(src proto.Message)
func (*ExecuteReply) XXX_Size ¶ added in v0.3.0
func (m *ExecuteReply) XXX_Size() int
func (*ExecuteReply) XXX_Unmarshal ¶ added in v0.3.0
func (m *ExecuteReply) XXX_Unmarshal(b []byte) error
type ExecuteRequest ¶
type ExecuteRequest struct { Shells []*Shell `protobuf:"bytes,1,rep,name=shells,proto3" json:"shells,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func NewExecuteRequest ¶
func NewExecuteRequest(shells ...*Shell) *ExecuteRequest
func (*ExecuteRequest) Descriptor ¶
func (*ExecuteRequest) Descriptor() ([]byte, []int)
func (*ExecuteRequest) GetShells ¶
func (m *ExecuteRequest) GetShells() []*Shell
func (*ExecuteRequest) ProtoMessage ¶
func (*ExecuteRequest) ProtoMessage()
func (*ExecuteRequest) Reset ¶
func (m *ExecuteRequest) Reset()
func (*ExecuteRequest) String ¶
func (m *ExecuteRequest) String() string
func (*ExecuteRequest) XXX_DiscardUnknown ¶ added in v0.3.0
func (m *ExecuteRequest) XXX_DiscardUnknown()
func (*ExecuteRequest) XXX_Marshal ¶ added in v0.3.0
func (m *ExecuteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExecuteRequest) XXX_Merge ¶ added in v0.3.0
func (m *ExecuteRequest) XXX_Merge(src proto.Message)
func (*ExecuteRequest) XXX_Size ¶ added in v0.3.0
func (m *ExecuteRequest) XXX_Size() int
func (*ExecuteRequest) XXX_Unmarshal ¶ added in v0.3.0
func (m *ExecuteRequest) XXX_Unmarshal(b []byte) error
type Result ¶
type Result struct { Output []byte `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Result) Descriptor ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) XXX_DiscardUnknown ¶ added in v0.3.0
func (m *Result) XXX_DiscardUnknown()
func (*Result) XXX_Marshal ¶ added in v0.3.0
func (*Result) XXX_Unmarshal ¶ added in v0.3.0
type RpcApiClient ¶
type RpcApiClient interface {
Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteReply, error)
}
RpcApiClient is the client API for RpcApi service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewInsecureClient ¶
func NewInsecureClient(host string, port uint, opts ...grpc.DialOption) (RpcApiClient, *grpc.ClientConn, error)
ApiClient
func NewRpcApiClient ¶
func NewRpcApiClient(cc *grpc.ClientConn) RpcApiClient
type RpcApiServer ¶
type RpcApiServer interface {
Execute(context.Context, *ExecuteRequest) (*ExecuteReply, error)
}
RpcApiServer is the server API for RpcApi service.
type Shell ¶
type Shell struct { Cmd string `protobuf:"bytes,1,opt,name=cmd,proto3" json:"cmd,omitempty"` Args []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"` In []byte `protobuf:"bytes,3,opt,name=in,proto3" json:"in,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Shell) Descriptor ¶
func (*Shell) ProtoMessage ¶
func (*Shell) ProtoMessage()
func (*Shell) XXX_DiscardUnknown ¶ added in v0.3.0
func (m *Shell) XXX_DiscardUnknown()
func (*Shell) XXX_Marshal ¶ added in v0.3.0
func (*Shell) XXX_Unmarshal ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.