Documentation ¶
Overview ¶
Package anycable is a generated protocol buffer package.
It is generated from these files:
rpc.proto
It has these top-level messages:
ConnectionRequest ConnectionResponse CommandMessage CommandResponse DisconnectRequest DisconnectResponse
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Status_name = map[int32]string{
0: "ERROR",
1: "SUCCESS",
2: "FAILURE",
}
View Source
var Status_value = map[string]int32{
"ERROR": 0,
"SUCCESS": 1,
"FAILURE": 2,
}
Functions ¶
func RegisterRPCServer ¶
Types ¶
type CommandMessage ¶
type CommandMessage struct { Command string `protobuf:"bytes,1,opt,name=command" json:"command,omitempty"` Identifier string `protobuf:"bytes,2,opt,name=identifier" json:"identifier,omitempty"` ConnectionIdentifiers string `protobuf:"bytes,3,opt,name=connection_identifiers,json=connectionIdentifiers" json:"connection_identifiers,omitempty"` Data string `protobuf:"bytes,4,opt,name=data" json:"data,omitempty"` }
func (*CommandMessage) Descriptor ¶
func (*CommandMessage) Descriptor() ([]byte, []int)
func (*CommandMessage) ProtoMessage ¶
func (*CommandMessage) ProtoMessage()
func (*CommandMessage) Reset ¶
func (m *CommandMessage) Reset()
func (*CommandMessage) String ¶
func (m *CommandMessage) String() string
type CommandResponse ¶
type CommandResponse struct { Status Status `protobuf:"varint,1,opt,name=status,enum=anycable.Status" json:"status,omitempty"` Disconnect bool `protobuf:"varint,2,opt,name=disconnect" json:"disconnect,omitempty"` StopStreams bool `protobuf:"varint,3,opt,name=stop_streams,json=stopStreams" json:"stop_streams,omitempty"` Streams []string `protobuf:"bytes,4,rep,name=streams" json:"streams,omitempty"` Transmissions []string `protobuf:"bytes,5,rep,name=transmissions" json:"transmissions,omitempty"` ErrorMsg string `protobuf:"bytes,6,opt,name=error_msg,json=errorMsg" json:"error_msg,omitempty"` }
func (*CommandResponse) Descriptor ¶
func (*CommandResponse) Descriptor() ([]byte, []int)
func (*CommandResponse) ProtoMessage ¶
func (*CommandResponse) ProtoMessage()
func (*CommandResponse) Reset ¶
func (m *CommandResponse) Reset()
func (*CommandResponse) String ¶
func (m *CommandResponse) String() string
type ConnectionRequest ¶
type ConnectionRequest struct { Path string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"` Headers map[string]string `` /* 134-byte string literal not displayed */ }
func (*ConnectionRequest) Descriptor ¶
func (*ConnectionRequest) Descriptor() ([]byte, []int)
func (*ConnectionRequest) GetHeaders ¶
func (m *ConnectionRequest) GetHeaders() map[string]string
func (*ConnectionRequest) ProtoMessage ¶
func (*ConnectionRequest) ProtoMessage()
func (*ConnectionRequest) Reset ¶
func (m *ConnectionRequest) Reset()
func (*ConnectionRequest) String ¶
func (m *ConnectionRequest) String() string
type ConnectionResponse ¶
type ConnectionResponse struct { Status Status `protobuf:"varint,1,opt,name=status,enum=anycable.Status" json:"status,omitempty"` Identifiers string `protobuf:"bytes,2,opt,name=identifiers" json:"identifiers,omitempty"` Transmissions []string `protobuf:"bytes,3,rep,name=transmissions" json:"transmissions,omitempty"` ErrorMsg string `protobuf:"bytes,4,opt,name=error_msg,json=errorMsg" json:"error_msg,omitempty"` }
func (*ConnectionResponse) Descriptor ¶
func (*ConnectionResponse) Descriptor() ([]byte, []int)
func (*ConnectionResponse) ProtoMessage ¶
func (*ConnectionResponse) ProtoMessage()
func (*ConnectionResponse) Reset ¶
func (m *ConnectionResponse) Reset()
func (*ConnectionResponse) String ¶
func (m *ConnectionResponse) String() string
type DisconnectRequest ¶
type DisconnectRequest struct { Identifiers string `protobuf:"bytes,1,opt,name=identifiers" json:"identifiers,omitempty"` Subscriptions []string `protobuf:"bytes,2,rep,name=subscriptions" json:"subscriptions,omitempty"` Path string `protobuf:"bytes,3,opt,name=path" json:"path,omitempty"` Headers map[string]string `` /* 134-byte string literal not displayed */ }
func (*DisconnectRequest) Descriptor ¶
func (*DisconnectRequest) Descriptor() ([]byte, []int)
func (*DisconnectRequest) GetHeaders ¶
func (m *DisconnectRequest) GetHeaders() map[string]string
func (*DisconnectRequest) ProtoMessage ¶
func (*DisconnectRequest) ProtoMessage()
func (*DisconnectRequest) Reset ¶
func (m *DisconnectRequest) Reset()
func (*DisconnectRequest) String ¶
func (m *DisconnectRequest) String() string
type DisconnectResponse ¶
type DisconnectResponse struct { Status Status `protobuf:"varint,1,opt,name=status,enum=anycable.Status" json:"status,omitempty"` ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg" json:"error_msg,omitempty"` }
func (*DisconnectResponse) Descriptor ¶
func (*DisconnectResponse) Descriptor() ([]byte, []int)
func (*DisconnectResponse) ProtoMessage ¶
func (*DisconnectResponse) ProtoMessage()
func (*DisconnectResponse) Reset ¶
func (m *DisconnectResponse) Reset()
func (*DisconnectResponse) String ¶
func (m *DisconnectResponse) String() string
type RPCClient ¶
type RPCClient interface { Connect(ctx context.Context, in *ConnectionRequest, opts ...grpc.CallOption) (*ConnectionResponse, error) Command(ctx context.Context, in *CommandMessage, opts ...grpc.CallOption) (*CommandResponse, error) Disconnect(ctx context.Context, in *DisconnectRequest, opts ...grpc.CallOption) (*DisconnectResponse, error) }
func NewRPCClient ¶
func NewRPCClient(cc *grpc.ClientConn) RPCClient
type RPCServer ¶
type RPCServer interface { Connect(context.Context, *ConnectionRequest) (*ConnectionResponse, error) Command(context.Context, *CommandMessage) (*CommandResponse, error) Disconnect(context.Context, *DisconnectRequest) (*DisconnectResponse, error) }
Click to show internal directories.
Click to hide internal directories.