Documentation
¶
Overview ¶
Package transport is a generated protocol buffer package.
It is generated from these files:
transport.proto
It has these top-level messages:
Broadcast Roomcast Result
Index ¶
- Variables
- func RegisterPropagateServer(s *grpc.Server, srv PropagateServer)
- type Broadcast
- func (*Broadcast) Descriptor() ([]byte, []int)
- func (m *Broadcast) GetData() []byte
- func (m *Broadcast) GetDataType() DataType
- func (m *Broadcast) GetEvent() string
- func (m *Broadcast) GetTimestamp() uint64
- func (*Broadcast) ProtoMessage()
- func (m *Broadcast) Reset()
- func (m *Broadcast) String() string
- type DataType
- type PropagateClient
- type PropagateServer
- type Result
- type Roomcast
- func (*Roomcast) Descriptor() ([]byte, []int)
- func (m *Roomcast) GetData() []byte
- func (m *Roomcast) GetDataType() DataType
- func (m *Roomcast) GetEvent() string
- func (m *Roomcast) GetRoom() string
- func (m *Roomcast) GetTimestamp() uint64
- func (*Roomcast) ProtoMessage()
- func (m *Roomcast) Reset()
- func (m *Roomcast) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var DataType_name = map[int32]string{
0: "STR",
1: "BIN",
2: "JSON",
}
View Source
var DataType_value = map[string]int32{
"STR": 0,
"BIN": 1,
"JSON": 2,
}
Functions ¶
func RegisterPropagateServer ¶
func RegisterPropagateServer(s *grpc.Server, srv PropagateServer)
Types ¶
type Broadcast ¶
type Broadcast struct { // unix nano timestamp Timestamp uint64 `protobuf:"fixed64,1,opt,name=timestamp" json:"timestamp,omitempty"` Event string `protobuf:"bytes,2,opt,name=event" json:"event,omitempty"` Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` DataType DataType `protobuf:"varint,4,opt,name=dataType,enum=transport.DataType" json:"dataType,omitempty"` }
func (*Broadcast) Descriptor ¶
func (*Broadcast) GetDataType ¶
func (*Broadcast) GetTimestamp ¶
func (*Broadcast) ProtoMessage ¶
func (*Broadcast) ProtoMessage()
type PropagateClient ¶
type PropagateClient interface { DoBroadcast(ctx context.Context, in *Broadcast, opts ...grpc.CallOption) (*Result, error) DoRoomcast(ctx context.Context, in *Roomcast, opts ...grpc.CallOption) (*Result, error) }
func NewPropagateClient ¶
func NewPropagateClient(cc *grpc.ClientConn) PropagateClient
type PropagateServer ¶
type Result ¶
type Result struct { Success bool `protobuf:"varint,1,opt,name=success" json:"success,omitempty"` // // should be the original unix nano timestamp sent by the client // useful for calculating round trip time Timestamp uint64 `protobuf:"fixed64,2,opt,name=timestamp" json:"timestamp,omitempty"` }
func (*Result) Descriptor ¶
func (*Result) GetSuccess ¶
func (*Result) GetTimestamp ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
type Roomcast ¶
type Roomcast struct { // unix nano timestamp Timestamp uint64 `protobuf:"fixed64,1,opt,name=timestamp" json:"timestamp,omitempty"` Room string `protobuf:"bytes,2,opt,name=room" json:"room,omitempty"` Event string `protobuf:"bytes,3,opt,name=event" json:"event,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` DataType DataType `protobuf:"varint,5,opt,name=dataType,enum=transport.DataType" json:"dataType,omitempty"` }
func (*Roomcast) Descriptor ¶
func (*Roomcast) GetDataType ¶
func (*Roomcast) GetTimestamp ¶
func (*Roomcast) ProtoMessage ¶
func (*Roomcast) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.