Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_occupancy_proto protoreflect.FileDescriptor
var Occupancy_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Occupancy.Occupancy", HandlerType: (*OccupancyServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Status", Handler: _Occupancy_Status_Handler, ServerStreams: true, }, }, Metadata: "occupancy.proto", }
Occupancy_ServiceDesc is the grpc.ServiceDesc for Occupancy service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOccupancyServer ¶
func RegisterOccupancyServer(s grpc.ServiceRegistrar, srv OccupancyServer)
Types ¶
type OccupancyClient ¶
type OccupancyClient interface {
Status(ctx context.Context, in *RoomConfig, opts ...grpc.CallOption) (Occupancy_StatusClient, error)
}
OccupancyClient is the client API for Occupancy 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 NewOccupancyClient ¶
func NewOccupancyClient(cc grpc.ClientConnInterface) OccupancyClient
type OccupancyServer ¶
type OccupancyServer interface { Status(*RoomConfig, Occupancy_StatusServer) error // contains filtered or unexported methods }
OccupancyServer is the server API for Occupancy service. All implementations must embed UnimplementedOccupancyServer for forward compatibility
type Occupancy_StatusClient ¶
type Occupancy_StatusClient interface { Recv() (*Room, error) grpc.ClientStream }
type Occupancy_StatusServer ¶
type Occupancy_StatusServer interface { Send(*Room) error grpc.ServerStream }
type Room ¶
type Room struct { People uint32 `protobuf:"varint,1,opt,name=people,proto3" json:"people,omitempty"` Fallen bool `protobuf:"varint,2,opt,name=fallen,proto3" json:"fallen,omitempty"` // contains filtered or unexported fields }
func (*Room) Descriptor
deprecated
func (*Room) ProtoMessage ¶
func (*Room) ProtoMessage()
func (*Room) ProtoReflect ¶
func (x *Room) ProtoReflect() protoreflect.Message
type RoomConfig ¶
type RoomConfig struct { Token []string `protobuf:"bytes,1,rep,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*RoomConfig) Descriptor
deprecated
func (*RoomConfig) Descriptor() ([]byte, []int)
Deprecated: Use RoomConfig.ProtoReflect.Descriptor instead.
func (*RoomConfig) GetToken ¶
func (x *RoomConfig) GetToken() []string
func (*RoomConfig) ProtoMessage ¶
func (*RoomConfig) ProtoMessage()
func (*RoomConfig) ProtoReflect ¶
func (x *RoomConfig) ProtoReflect() protoreflect.Message
func (*RoomConfig) Reset ¶
func (x *RoomConfig) Reset()
func (*RoomConfig) String ¶
func (x *RoomConfig) String() string
type UnimplementedOccupancyServer ¶
type UnimplementedOccupancyServer struct { }
UnimplementedOccupancyServer must be embedded to have forward compatible implementations.
func (UnimplementedOccupancyServer) Status ¶
func (UnimplementedOccupancyServer) Status(*RoomConfig, Occupancy_StatusServer) error
type UnsafeOccupancyServer ¶
type UnsafeOccupancyServer interface {
// contains filtered or unexported methods
}
UnsafeOccupancyServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OccupancyServer will result in compilation errors.