anycable

package
v1.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2023 License: MIT Imports: 9 Imported by: 2

Documentation

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 RegisterHandlerRPC added in v1.4.0

func RegisterHandlerRPC(reg grpchan.ServiceRegistry, srv RPCServer)

func RegisterRPCServer

func RegisterRPCServer(s *grpc.Server, srv RPCServer)

Types

type CommandMessage

type CommandMessage struct {
	Command               string   `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
	Identifier            string   `protobuf:"bytes,2,opt,name=identifier,proto3" json:"identifier,omitempty"`
	ConnectionIdentifiers string   `protobuf:"bytes,3,opt,name=connection_identifiers,json=connectionIdentifiers,proto3" json:"connection_identifiers,omitempty"`
	Data                  string   `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	Env                   *Env     `protobuf:"bytes,5,opt,name=env,proto3" json:"env,omitempty"`
	XXX_NoUnkeyedLiteral  struct{} `json:"-"`
	XXX_unrecognized      []byte   `json:"-"`
	XXX_sizecache         int32    `json:"-"`
}

func (*CommandMessage) Descriptor

func (*CommandMessage) Descriptor() ([]byte, []int)

func (*CommandMessage) GetCommand added in v1.0.1

func (m *CommandMessage) GetCommand() string

func (*CommandMessage) GetConnectionIdentifiers added in v1.0.1

func (m *CommandMessage) GetConnectionIdentifiers() string

func (*CommandMessage) GetData added in v1.0.1

func (m *CommandMessage) GetData() string

func (*CommandMessage) GetEnv added in v1.0.1

func (m *CommandMessage) GetEnv() *Env

func (*CommandMessage) GetIdentifier added in v1.0.1

func (m *CommandMessage) GetIdentifier() string

func (*CommandMessage) ProtoMessage

func (*CommandMessage) ProtoMessage()

func (*CommandMessage) Reset

func (m *CommandMessage) Reset()

func (*CommandMessage) String

func (m *CommandMessage) String() string

func (*CommandMessage) XXX_DiscardUnknown added in v1.0.1

func (m *CommandMessage) XXX_DiscardUnknown()

func (*CommandMessage) XXX_Marshal added in v1.0.1

func (m *CommandMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CommandMessage) XXX_Merge added in v1.0.1

func (m *CommandMessage) XXX_Merge(src proto.Message)

func (*CommandMessage) XXX_Size added in v1.0.1

func (m *CommandMessage) XXX_Size() int

func (*CommandMessage) XXX_Unmarshal added in v1.0.1

func (m *CommandMessage) XXX_Unmarshal(b []byte) error

type CommandResponse

type CommandResponse struct {
	Status               Status       `protobuf:"varint,1,opt,name=status,proto3,enum=anycable.Status" json:"status,omitempty"`
	Disconnect           bool         `protobuf:"varint,2,opt,name=disconnect,proto3" json:"disconnect,omitempty"`
	StopStreams          bool         `protobuf:"varint,3,opt,name=stop_streams,json=stopStreams,proto3" json:"stop_streams,omitempty"`
	Streams              []string     `protobuf:"bytes,4,rep,name=streams,proto3" json:"streams,omitempty"`
	Transmissions        []string     `protobuf:"bytes,5,rep,name=transmissions,proto3" json:"transmissions,omitempty"`
	ErrorMsg             string       `protobuf:"bytes,6,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`
	Env                  *EnvResponse `protobuf:"bytes,7,opt,name=env,proto3" json:"env,omitempty"`
	StoppedStreams       []string     `protobuf:"bytes,8,rep,name=stopped_streams,json=stoppedStreams,proto3" json:"stopped_streams,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*CommandResponse) Descriptor

func (*CommandResponse) Descriptor() ([]byte, []int)

func (*CommandResponse) GetDisconnect added in v1.0.1

func (m *CommandResponse) GetDisconnect() bool

func (*CommandResponse) GetEnv added in v1.0.1

func (m *CommandResponse) GetEnv() *EnvResponse

func (*CommandResponse) GetErrorMsg added in v1.0.1

func (m *CommandResponse) GetErrorMsg() string

func (*CommandResponse) GetStatus added in v1.0.1

func (m *CommandResponse) GetStatus() Status

func (*CommandResponse) GetStopStreams added in v1.0.1

func (m *CommandResponse) GetStopStreams() bool

func (*CommandResponse) GetStoppedStreams added in v1.0.1

func (m *CommandResponse) GetStoppedStreams() []string

func (*CommandResponse) GetStreams added in v1.0.1

func (m *CommandResponse) GetStreams() []string

func (*CommandResponse) GetTransmissions added in v1.0.1

func (m *CommandResponse) GetTransmissions() []string

func (*CommandResponse) ProtoMessage

func (*CommandResponse) ProtoMessage()

func (*CommandResponse) Reset

func (m *CommandResponse) Reset()

func (*CommandResponse) String

func (m *CommandResponse) String() string

func (*CommandResponse) XXX_DiscardUnknown added in v1.0.1

func (m *CommandResponse) XXX_DiscardUnknown()

func (*CommandResponse) XXX_Marshal added in v1.0.1

func (m *CommandResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CommandResponse) XXX_Merge added in v1.0.1

func (m *CommandResponse) XXX_Merge(src proto.Message)

func (*CommandResponse) XXX_Size added in v1.0.1

func (m *CommandResponse) XXX_Size() int

func (*CommandResponse) XXX_Unmarshal added in v1.0.1

func (m *CommandResponse) XXX_Unmarshal(b []byte) error

type ConnectionRequest

type ConnectionRequest struct {
	Env                  *Env     `protobuf:"bytes,3,opt,name=env,proto3" json:"env,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ConnectionRequest) Descriptor

func (*ConnectionRequest) Descriptor() ([]byte, []int)

func (*ConnectionRequest) GetEnv added in v1.0.1

func (m *ConnectionRequest) GetEnv() *Env

func (*ConnectionRequest) ProtoMessage

func (*ConnectionRequest) ProtoMessage()

func (*ConnectionRequest) Reset

func (m *ConnectionRequest) Reset()

func (*ConnectionRequest) String

func (m *ConnectionRequest) String() string

func (*ConnectionRequest) XXX_DiscardUnknown added in v1.0.1

func (m *ConnectionRequest) XXX_DiscardUnknown()

func (*ConnectionRequest) XXX_Marshal added in v1.0.1

func (m *ConnectionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnectionRequest) XXX_Merge added in v1.0.1

func (m *ConnectionRequest) XXX_Merge(src proto.Message)

func (*ConnectionRequest) XXX_Size added in v1.0.1

func (m *ConnectionRequest) XXX_Size() int

func (*ConnectionRequest) XXX_Unmarshal added in v1.0.1

func (m *ConnectionRequest) XXX_Unmarshal(b []byte) error

type ConnectionResponse

type ConnectionResponse struct {
	Status               Status       `protobuf:"varint,1,opt,name=status,proto3,enum=anycable.Status" json:"status,omitempty"`
	Identifiers          string       `protobuf:"bytes,2,opt,name=identifiers,proto3" json:"identifiers,omitempty"`
	Transmissions        []string     `protobuf:"bytes,3,rep,name=transmissions,proto3" json:"transmissions,omitempty"`
	ErrorMsg             string       `protobuf:"bytes,4,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`
	Env                  *EnvResponse `protobuf:"bytes,5,opt,name=env,proto3" json:"env,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*ConnectionResponse) Descriptor

func (*ConnectionResponse) Descriptor() ([]byte, []int)

func (*ConnectionResponse) GetEnv added in v1.0.1

func (m *ConnectionResponse) GetEnv() *EnvResponse

func (*ConnectionResponse) GetErrorMsg added in v1.0.1

func (m *ConnectionResponse) GetErrorMsg() string

func (*ConnectionResponse) GetIdentifiers added in v1.0.1

func (m *ConnectionResponse) GetIdentifiers() string

func (*ConnectionResponse) GetStatus added in v1.0.1

func (m *ConnectionResponse) GetStatus() Status

func (*ConnectionResponse) GetTransmissions added in v1.0.1

func (m *ConnectionResponse) GetTransmissions() []string

func (*ConnectionResponse) ProtoMessage

func (*ConnectionResponse) ProtoMessage()

func (*ConnectionResponse) Reset

func (m *ConnectionResponse) Reset()

func (*ConnectionResponse) String

func (m *ConnectionResponse) String() string

func (*ConnectionResponse) XXX_DiscardUnknown added in v1.0.1

func (m *ConnectionResponse) XXX_DiscardUnknown()

func (*ConnectionResponse) XXX_Marshal added in v1.0.1

func (m *ConnectionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnectionResponse) XXX_Merge added in v1.0.1

func (m *ConnectionResponse) XXX_Merge(src proto.Message)

func (*ConnectionResponse) XXX_Size added in v1.0.1

func (m *ConnectionResponse) XXX_Size() int

func (*ConnectionResponse) XXX_Unmarshal added in v1.0.1

func (m *ConnectionResponse) XXX_Unmarshal(b []byte) error

type DisconnectRequest

type DisconnectRequest struct {
	Identifiers          string   `protobuf:"bytes,1,opt,name=identifiers,proto3" json:"identifiers,omitempty"`
	Subscriptions        []string `protobuf:"bytes,2,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"`
	Env                  *Env     `protobuf:"bytes,5,opt,name=env,proto3" json:"env,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DisconnectRequest) Descriptor

func (*DisconnectRequest) Descriptor() ([]byte, []int)

func (*DisconnectRequest) GetEnv added in v1.0.1

func (m *DisconnectRequest) GetEnv() *Env

func (*DisconnectRequest) GetIdentifiers added in v1.0.1

func (m *DisconnectRequest) GetIdentifiers() string

func (*DisconnectRequest) GetSubscriptions added in v1.0.1

func (m *DisconnectRequest) GetSubscriptions() []string

func (*DisconnectRequest) ProtoMessage

func (*DisconnectRequest) ProtoMessage()

func (*DisconnectRequest) Reset

func (m *DisconnectRequest) Reset()

func (*DisconnectRequest) String

func (m *DisconnectRequest) String() string

func (*DisconnectRequest) XXX_DiscardUnknown added in v1.0.1

func (m *DisconnectRequest) XXX_DiscardUnknown()

func (*DisconnectRequest) XXX_Marshal added in v1.0.1

func (m *DisconnectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DisconnectRequest) XXX_Merge added in v1.0.1

func (m *DisconnectRequest) XXX_Merge(src proto.Message)

func (*DisconnectRequest) XXX_Size added in v1.0.1

func (m *DisconnectRequest) XXX_Size() int

func (*DisconnectRequest) XXX_Unmarshal added in v1.0.1

func (m *DisconnectRequest) XXX_Unmarshal(b []byte) error

type DisconnectResponse

type DisconnectResponse struct {
	Status               Status   `protobuf:"varint,1,opt,name=status,proto3,enum=anycable.Status" json:"status,omitempty"`
	ErrorMsg             string   `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DisconnectResponse) Descriptor

func (*DisconnectResponse) Descriptor() ([]byte, []int)

func (*DisconnectResponse) GetErrorMsg added in v1.0.1

func (m *DisconnectResponse) GetErrorMsg() string

func (*DisconnectResponse) GetStatus added in v1.0.1

func (m *DisconnectResponse) GetStatus() Status

func (*DisconnectResponse) ProtoMessage

func (*DisconnectResponse) ProtoMessage()

func (*DisconnectResponse) Reset

func (m *DisconnectResponse) Reset()

func (*DisconnectResponse) String

func (m *DisconnectResponse) String() string

func (*DisconnectResponse) XXX_DiscardUnknown added in v1.0.1

func (m *DisconnectResponse) XXX_DiscardUnknown()

func (*DisconnectResponse) XXX_Marshal added in v1.0.1

func (m *DisconnectResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DisconnectResponse) XXX_Merge added in v1.0.1

func (m *DisconnectResponse) XXX_Merge(src proto.Message)

func (*DisconnectResponse) XXX_Size added in v1.0.1

func (m *DisconnectResponse) XXX_Size() int

func (*DisconnectResponse) XXX_Unmarshal added in v1.0.1

func (m *DisconnectResponse) XXX_Unmarshal(b []byte) error

type Env added in v1.0.1

type Env struct {
	Url                  string            `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	Headers              map[string]string `` /* 155-byte string literal not displayed */
	Cstate               map[string]string `` /* 153-byte string literal not displayed */
	Istate               map[string]string `` /* 153-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Env) Descriptor added in v1.0.1

func (*Env) Descriptor() ([]byte, []int)

func (*Env) GetCstate added in v1.0.1

func (m *Env) GetCstate() map[string]string

func (*Env) GetHeaders added in v1.0.1

func (m *Env) GetHeaders() map[string]string

func (*Env) GetIstate added in v1.0.1

func (m *Env) GetIstate() map[string]string

func (*Env) GetUrl added in v1.0.1

func (m *Env) GetUrl() string

func (*Env) ProtoMessage added in v1.0.1

func (*Env) ProtoMessage()

func (*Env) Reset added in v1.0.1

func (m *Env) Reset()

func (*Env) String added in v1.0.1

func (m *Env) String() string

func (*Env) XXX_DiscardUnknown added in v1.0.1

func (m *Env) XXX_DiscardUnknown()

func (*Env) XXX_Marshal added in v1.0.1

func (m *Env) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Env) XXX_Merge added in v1.0.1

func (m *Env) XXX_Merge(src proto.Message)

func (*Env) XXX_Size added in v1.0.1

func (m *Env) XXX_Size() int

func (*Env) XXX_Unmarshal added in v1.0.1

func (m *Env) XXX_Unmarshal(b []byte) error

type EnvResponse added in v1.0.1

type EnvResponse struct {
	Cstate               map[string]string `` /* 153-byte string literal not displayed */
	Istate               map[string]string `` /* 153-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*EnvResponse) Descriptor added in v1.0.1

func (*EnvResponse) Descriptor() ([]byte, []int)

func (*EnvResponse) GetCstate added in v1.0.1

func (m *EnvResponse) GetCstate() map[string]string

func (*EnvResponse) GetIstate added in v1.0.1

func (m *EnvResponse) GetIstate() map[string]string

func (*EnvResponse) ProtoMessage added in v1.0.1

func (*EnvResponse) ProtoMessage()

func (*EnvResponse) Reset added in v1.0.1

func (m *EnvResponse) Reset()

func (*EnvResponse) String added in v1.0.1

func (m *EnvResponse) String() string

func (*EnvResponse) XXX_DiscardUnknown added in v1.0.1

func (m *EnvResponse) XXX_DiscardUnknown()

func (*EnvResponse) XXX_Marshal added in v1.0.1

func (m *EnvResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EnvResponse) XXX_Merge added in v1.0.1

func (m *EnvResponse) XXX_Merge(src proto.Message)

func (*EnvResponse) XXX_Size added in v1.0.1

func (m *EnvResponse) XXX_Size() int

func (*EnvResponse) XXX_Unmarshal added in v1.0.1

func (m *EnvResponse) XXX_Unmarshal(b []byte) error

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)
}

RPCClient is the client API for RPC service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewRPCChannelClient added in v1.4.0

func NewRPCChannelClient(ch grpchan.Channel) RPCClient

func NewRPCClient

func NewRPCClient(cc *grpc.ClientConn) RPCClient

type RPCServer

RPCServer is the server API for RPC service.

type Status

type Status int32
const (
	Status_ERROR   Status = 0
	Status_SUCCESS Status = 1
	Status_FAILURE Status = 2
)

func (Status) EnumDescriptor

func (Status) EnumDescriptor() ([]byte, []int)

func (Status) String

func (x Status) String() string

type UnimplementedRPCServer added in v1.0.1

type UnimplementedRPCServer struct {
}

UnimplementedRPCServer can be embedded to have forward compatible implementations.

func (*UnimplementedRPCServer) Command added in v1.0.1

func (*UnimplementedRPCServer) Connect added in v1.0.1

func (*UnimplementedRPCServer) Disconnect added in v1.0.1

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL