broker

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Broker_Push_FullMethodName          = "/api.broker.Broker/Push"
	Broker_PushMsg_FullMethodName       = "/api.broker.Broker/PushMsg"
	Broker_Broadcast_FullMethodName     = "/api.broker.Broker/Broadcast"
	Broker_BroadcastRoom_FullMethodName = "/api.broker.Broker/BroadcastRoom"
	Broker_Rooms_FullMethodName         = "/api.broker.Broker/Rooms"
)

Variables

View Source
var Broker_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.broker.Broker",
	HandlerType: (*BrokerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Push",
			Handler:    _Broker_Push_Handler,
		},
		{
			MethodName: "PushMsg",
			Handler:    _Broker_PushMsg_Handler,
		},
		{
			MethodName: "Broadcast",
			Handler:    _Broker_Broadcast_Handler,
		},
		{
			MethodName: "BroadcastRoom",
			Handler:    _Broker_BroadcastRoom_Handler,
		},
		{
			MethodName: "Rooms",
			Handler:    _Broker_Rooms_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/broker/broker.proto",
}

Broker_ServiceDesc is the grpc.ServiceDesc for Broker service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_api_broker_broker_proto protoreflect.FileDescriptor

Functions

func RegisterBrokerServer

func RegisterBrokerServer(s grpc.ServiceRegistrar, srv BrokerServer)

Types

type BroadcastReply

type BroadcastReply struct {
	// contains filtered or unexported fields
}

func (*BroadcastReply) Descriptor deprecated

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

Deprecated: Use BroadcastReply.ProtoReflect.Descriptor instead.

func (*BroadcastReply) ProtoMessage

func (*BroadcastReply) ProtoMessage()

func (*BroadcastReply) ProtoReflect

func (x *BroadcastReply) ProtoReflect() protoreflect.Message

func (*BroadcastReply) Reset

func (x *BroadcastReply) Reset()

func (*BroadcastReply) String

func (x *BroadcastReply) String() string

type BroadcastReq

type BroadcastReq struct {
	ProtoOp int32             `protobuf:"varint,1,opt,name=proto_op,json=protoOp,proto3" json:"proto_op,omitempty"`
	Msg     *protocol.Message `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Speed   int32             `protobuf:"varint,3,opt,name=speed,proto3" json:"speed,omitempty"`
	// contains filtered or unexported fields
}

func (*BroadcastReq) Descriptor deprecated

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

Deprecated: Use BroadcastReq.ProtoReflect.Descriptor instead.

func (*BroadcastReq) GetMsg

func (x *BroadcastReq) GetMsg() *protocol.Message

func (*BroadcastReq) GetProtoOp

func (x *BroadcastReq) GetProtoOp() int32

func (*BroadcastReq) GetSpeed

func (x *BroadcastReq) GetSpeed() int32

func (*BroadcastReq) ProtoMessage

func (*BroadcastReq) ProtoMessage()

func (*BroadcastReq) ProtoReflect

func (x *BroadcastReq) ProtoReflect() protoreflect.Message

func (*BroadcastReq) Reset

func (x *BroadcastReq) Reset()

func (*BroadcastReq) String

func (x *BroadcastReq) String() string

type BroadcastRoomReply

type BroadcastRoomReply struct {
	// contains filtered or unexported fields
}

func (*BroadcastRoomReply) Descriptor deprecated

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

Deprecated: Use BroadcastRoomReply.ProtoReflect.Descriptor instead.

func (*BroadcastRoomReply) ProtoMessage

func (*BroadcastRoomReply) ProtoMessage()

func (*BroadcastRoomReply) ProtoReflect

func (x *BroadcastRoomReply) ProtoReflect() protoreflect.Message

func (*BroadcastRoomReply) Reset

func (x *BroadcastRoomReply) Reset()

func (*BroadcastRoomReply) String

func (x *BroadcastRoomReply) String() string

type BroadcastRoomReq

type BroadcastRoomReq struct {
	Msg    *protocol.Message `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	RoomId string            `protobuf:"bytes,2,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
	// contains filtered or unexported fields
}

func (*BroadcastRoomReq) Descriptor deprecated

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

Deprecated: Use BroadcastRoomReq.ProtoReflect.Descriptor instead.

func (*BroadcastRoomReq) GetMsg

func (x *BroadcastRoomReq) GetMsg() *protocol.Message

func (*BroadcastRoomReq) GetRoomId

func (x *BroadcastRoomReq) GetRoomId() string

func (*BroadcastRoomReq) ProtoMessage

func (*BroadcastRoomReq) ProtoMessage()

func (*BroadcastRoomReq) ProtoReflect

func (x *BroadcastRoomReq) ProtoReflect() protoreflect.Message

func (*BroadcastRoomReq) Reset

func (x *BroadcastRoomReq) Reset()

func (*BroadcastRoomReq) String

func (x *BroadcastRoomReq) String() string

type BrokerClient

type BrokerClient interface {
	Push(ctx context.Context, in *PushReq, opts ...grpc.CallOption) (*PushReply, error)
	PushMsg(ctx context.Context, in *PushMsgReq, opts ...grpc.CallOption) (*PushMsgReply, error)
	Broadcast(ctx context.Context, in *BroadcastReq, opts ...grpc.CallOption) (*BroadcastReply, error)
	BroadcastRoom(ctx context.Context, in *BroadcastRoomReq, opts ...grpc.CallOption) (*BroadcastRoomReply, error)
	Rooms(ctx context.Context, in *RoomsReq, opts ...grpc.CallOption) (*RoomsReply, error)
}

BrokerClient is the client API for Broker service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewBrokerClient

func NewBrokerClient(cc grpc.ClientConnInterface) BrokerClient

type BrokerServer

type BrokerServer interface {
	Push(context.Context, *PushReq) (*PushReply, error)
	PushMsg(context.Context, *PushMsgReq) (*PushMsgReply, error)
	Broadcast(context.Context, *BroadcastReq) (*BroadcastReply, error)
	BroadcastRoom(context.Context, *BroadcastRoomReq) (*BroadcastRoomReply, error)
	Rooms(context.Context, *RoomsReq) (*RoomsReply, error)
	// contains filtered or unexported methods
}

BrokerServer is the server API for Broker service. All implementations must embed UnimplementedBrokerServer for forward compatibility

type PushMsgReply

type PushMsgReply struct {
	// contains filtered or unexported fields
}

func (*PushMsgReply) Descriptor deprecated

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

Deprecated: Use PushMsgReply.ProtoReflect.Descriptor instead.

func (*PushMsgReply) ProtoMessage

func (*PushMsgReply) ProtoMessage()

func (*PushMsgReply) ProtoReflect

func (x *PushMsgReply) ProtoReflect() protoreflect.Message

func (*PushMsgReply) Reset

func (x *PushMsgReply) Reset()

func (*PushMsgReply) String

func (x *PushMsgReply) String() string

type PushMsgReq

type PushMsgReq struct {
	ProtoOp int32             `protobuf:"varint,1,opt,name=proto_op,json=protoOp,proto3" json:"proto_op,omitempty"`
	Msg     *protocol.Message `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Keys    []string          `protobuf:"bytes,3,rep,name=keys,proto3" json:"keys,omitempty"`
	// contains filtered or unexported fields
}

func (*PushMsgReq) Descriptor deprecated

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

Deprecated: Use PushMsgReq.ProtoReflect.Descriptor instead.

func (*PushMsgReq) GetKeys

func (x *PushMsgReq) GetKeys() []string

func (*PushMsgReq) GetMsg

func (x *PushMsgReq) GetMsg() *protocol.Message

func (*PushMsgReq) GetProtoOp

func (x *PushMsgReq) GetProtoOp() int32

func (*PushMsgReq) ProtoMessage

func (*PushMsgReq) ProtoMessage()

func (*PushMsgReq) ProtoReflect

func (x *PushMsgReq) ProtoReflect() protoreflect.Message

func (*PushMsgReq) Reset

func (x *PushMsgReq) Reset()

func (*PushMsgReq) String

func (x *PushMsgReq) String() string

type PushReply

type PushReply struct {
	BaseReply *protocol.BaseReply `protobuf:"bytes,1,opt,name=base_reply,json=baseReply,proto3" json:"base_reply,omitempty"`
	// contains filtered or unexported fields
}

func (*PushReply) Descriptor deprecated

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

Deprecated: Use PushReply.ProtoReflect.Descriptor instead.

func (*PushReply) GetBaseReply

func (x *PushReply) GetBaseReply() *protocol.BaseReply

func (*PushReply) ProtoMessage

func (*PushReply) ProtoMessage()

func (*PushReply) ProtoReflect

func (x *PushReply) ProtoReflect() protoreflect.Message

func (*PushReply) Reset

func (x *PushReply) Reset()

func (*PushReply) String

func (x *PushReply) String() string

type PushReq

type PushReq struct {
	Messages []*protocol.TransMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	// contains filtered or unexported fields
}

func (*PushReq) Descriptor deprecated

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

Deprecated: Use PushReq.ProtoReflect.Descriptor instead.

func (*PushReq) GetMessages

func (x *PushReq) GetMessages() []*protocol.TransMessage

func (*PushReq) ProtoMessage

func (*PushReq) ProtoMessage()

func (*PushReq) ProtoReflect

func (x *PushReq) ProtoReflect() protoreflect.Message

func (*PushReq) Reset

func (x *PushReq) Reset()

func (*PushReq) String

func (x *PushReq) String() string

type RoomsReply

type RoomsReply struct {
	Rooms map[string]bool `` /* 152-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*RoomsReply) Descriptor deprecated

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

Deprecated: Use RoomsReply.ProtoReflect.Descriptor instead.

func (*RoomsReply) GetRooms

func (x *RoomsReply) GetRooms() map[string]bool

func (*RoomsReply) ProtoMessage

func (*RoomsReply) ProtoMessage()

func (*RoomsReply) ProtoReflect

func (x *RoomsReply) ProtoReflect() protoreflect.Message

func (*RoomsReply) Reset

func (x *RoomsReply) Reset()

func (*RoomsReply) String

func (x *RoomsReply) String() string

type RoomsReq

type RoomsReq struct {
	// contains filtered or unexported fields
}

func (*RoomsReq) Descriptor deprecated

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

Deprecated: Use RoomsReq.ProtoReflect.Descriptor instead.

func (*RoomsReq) ProtoMessage

func (*RoomsReq) ProtoMessage()

func (*RoomsReq) ProtoReflect

func (x *RoomsReq) ProtoReflect() protoreflect.Message

func (*RoomsReq) Reset

func (x *RoomsReq) Reset()

func (*RoomsReq) String

func (x *RoomsReq) String() string

type UnimplementedBrokerServer

type UnimplementedBrokerServer struct {
}

UnimplementedBrokerServer must be embedded to have forward compatible implementations.

func (UnimplementedBrokerServer) Broadcast

func (UnimplementedBrokerServer) BroadcastRoom

func (UnimplementedBrokerServer) Push

func (UnimplementedBrokerServer) PushMsg

func (UnimplementedBrokerServer) Rooms

type UnsafeBrokerServer

type UnsafeBrokerServer interface {
	// contains filtered or unexported methods
}

UnsafeBrokerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BrokerServer will result in compilation errors.

Jump to

Keyboard shortcuts

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