Documentation ¶
Overview ¶
Package terminal is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterTerminalHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTerminalHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TerminalClient) error
- func RegisterTerminalHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTerminalServer(s *grpc.Server, srv TerminalServer)
- type Service
- type SessionRequest
- func (*SessionRequest) Descriptor() ([]byte, []int)
- func (m *SessionRequest) GetCommand() isSessionRequest_Command
- func (m *SessionRequest) GetMessage() string
- func (m *SessionRequest) GetResize() *TerminalResize
- func (*SessionRequest) ProtoMessage()
- func (m *SessionRequest) Reset()
- func (m *SessionRequest) String() string
- func (m *SessionRequest) XXX_DiscardUnknown()
- func (m *SessionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SessionRequest) XXX_Merge(src proto.Message)
- func (*SessionRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- func (m *SessionRequest) XXX_Size() int
- func (m *SessionRequest) XXX_Unmarshal(b []byte) error
- type SessionRequest_Message
- type SessionRequest_Resize
- type SessionResponse
- func (*SessionResponse) Descriptor() ([]byte, []int)
- func (m *SessionResponse) GetMessage() string
- func (*SessionResponse) ProtoMessage()
- func (m *SessionResponse) Reset()
- func (m *SessionResponse) String() string
- func (m *SessionResponse) XXX_DiscardUnknown()
- func (m *SessionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SessionResponse) XXX_Merge(src proto.Message)
- func (m *SessionResponse) XXX_Size() int
- func (m *SessionResponse) XXX_Unmarshal(b []byte) error
- type SessionWriter
- type TerminalClient
- type TerminalResize
- func (*TerminalResize) Descriptor() ([]byte, []int)
- func (m *TerminalResize) GetColumns() int32
- func (m *TerminalResize) GetRows() int32
- func (*TerminalResize) ProtoMessage()
- func (m *TerminalResize) Reset()
- func (m *TerminalResize) String() string
- func (m *TerminalResize) XXX_DiscardUnknown()
- func (m *TerminalResize) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TerminalResize) XXX_Merge(src proto.Message)
- func (m *TerminalResize) XXX_Size() int
- func (m *TerminalResize) XXX_Unmarshal(b []byte) error
- type TerminalServer
- type Terminal_SessionClient
- type Terminal_SessionServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTerminalHandler ¶
func RegisterTerminalHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterTerminalHandler registers the http handlers for service Terminal to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterTerminalHandlerClient ¶
func RegisterTerminalHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TerminalClient) error
RegisterTerminalHandlerClient registers the http handlers for service Terminal to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TerminalClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TerminalClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TerminalClient" to call the correct interceptors.
func RegisterTerminalHandlerFromEndpoint ¶
func RegisterTerminalHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterTerminalHandlerFromEndpoint is same as RegisterTerminalHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTerminalServer ¶
func RegisterTerminalServer(s *grpc.Server, srv TerminalServer)
Types ¶
type Service ¶
type Service struct{}
Service serve the terminal session
func (*Service) Session ¶
func (*Service) Session(session Terminal_SessionServer) error
Session rpc manage streaming session between client and server
type SessionRequest ¶
type SessionRequest struct { // Types that are valid to be assigned to Command: // *SessionRequest_Message // *SessionRequest_Resize Command isSessionRequest_Command `protobuf_oneof:"command"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SessionRequest) Descriptor ¶
func (*SessionRequest) Descriptor() ([]byte, []int)
func (*SessionRequest) GetCommand ¶
func (m *SessionRequest) GetCommand() isSessionRequest_Command
func (*SessionRequest) GetMessage ¶
func (m *SessionRequest) GetMessage() string
func (*SessionRequest) GetResize ¶
func (m *SessionRequest) GetResize() *TerminalResize
func (*SessionRequest) ProtoMessage ¶
func (*SessionRequest) ProtoMessage()
func (*SessionRequest) Reset ¶
func (m *SessionRequest) Reset()
func (*SessionRequest) String ¶
func (m *SessionRequest) String() string
func (*SessionRequest) XXX_DiscardUnknown ¶
func (m *SessionRequest) XXX_DiscardUnknown()
func (*SessionRequest) XXX_Marshal ¶
func (m *SessionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SessionRequest) XXX_Merge ¶
func (m *SessionRequest) XXX_Merge(src proto.Message)
func (*SessionRequest) XXX_OneofFuncs ¶
func (*SessionRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
func (*SessionRequest) XXX_Size ¶
func (m *SessionRequest) XXX_Size() int
func (*SessionRequest) XXX_Unmarshal ¶
func (m *SessionRequest) XXX_Unmarshal(b []byte) error
type SessionRequest_Message ¶
type SessionRequest_Message struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3,oneof"`
}
type SessionRequest_Resize ¶
type SessionRequest_Resize struct {
Resize *TerminalResize `protobuf:"bytes,2,opt,name=resize,proto3,oneof"`
}
type SessionResponse ¶
type SessionResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SessionResponse) Descriptor ¶
func (*SessionResponse) Descriptor() ([]byte, []int)
func (*SessionResponse) GetMessage ¶
func (m *SessionResponse) GetMessage() string
func (*SessionResponse) ProtoMessage ¶
func (*SessionResponse) ProtoMessage()
func (*SessionResponse) Reset ¶
func (m *SessionResponse) Reset()
func (*SessionResponse) String ¶
func (m *SessionResponse) String() string
func (*SessionResponse) XXX_DiscardUnknown ¶
func (m *SessionResponse) XXX_DiscardUnknown()
func (*SessionResponse) XXX_Marshal ¶
func (m *SessionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SessionResponse) XXX_Merge ¶
func (m *SessionResponse) XXX_Merge(src proto.Message)
func (*SessionResponse) XXX_Size ¶
func (m *SessionResponse) XXX_Size() int
func (*SessionResponse) XXX_Unmarshal ¶
func (m *SessionResponse) XXX_Unmarshal(b []byte) error
type SessionWriter ¶
type SessionWriter struct {
// contains filtered or unexported fields
}
type TerminalClient ¶
type TerminalClient interface {
Session(ctx context.Context, opts ...grpc.CallOption) (Terminal_SessionClient, error)
}
TerminalClient is the client API for Terminal service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTerminalClient ¶
func NewTerminalClient(cc *grpc.ClientConn) TerminalClient
type TerminalResize ¶
type TerminalResize struct { Columns int32 `protobuf:"varint,1,opt,name=columns,proto3" json:"columns,omitempty"` Rows int32 `protobuf:"varint,2,opt,name=rows,proto3" json:"rows,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TerminalResize) Descriptor ¶
func (*TerminalResize) Descriptor() ([]byte, []int)
func (*TerminalResize) GetColumns ¶
func (m *TerminalResize) GetColumns() int32
func (*TerminalResize) GetRows ¶
func (m *TerminalResize) GetRows() int32
func (*TerminalResize) ProtoMessage ¶
func (*TerminalResize) ProtoMessage()
func (*TerminalResize) Reset ¶
func (m *TerminalResize) Reset()
func (*TerminalResize) String ¶
func (m *TerminalResize) String() string
func (*TerminalResize) XXX_DiscardUnknown ¶
func (m *TerminalResize) XXX_DiscardUnknown()
func (*TerminalResize) XXX_Marshal ¶
func (m *TerminalResize) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TerminalResize) XXX_Merge ¶
func (m *TerminalResize) XXX_Merge(src proto.Message)
func (*TerminalResize) XXX_Size ¶
func (m *TerminalResize) XXX_Size() int
func (*TerminalResize) XXX_Unmarshal ¶
func (m *TerminalResize) XXX_Unmarshal(b []byte) error
type TerminalServer ¶
type TerminalServer interface {
Session(Terminal_SessionServer) error
}
TerminalServer is the server API for Terminal service.
type Terminal_SessionClient ¶
type Terminal_SessionClient interface { Send(*SessionRequest) error Recv() (*SessionResponse, error) grpc.ClientStream }
type Terminal_SessionServer ¶
type Terminal_SessionServer interface { Send(*SessionResponse) error Recv() (*SessionRequest, error) grpc.ServerStream }