st_grpc

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_st_grpc_st_grpc_proto protoreflect.FileDescriptor
View Source
var LiveMessageService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "st_grpc.LiveMessageService",
	HandlerType: (*LiveMessageServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamMessages",
			Handler:       _LiveMessageService_StreamMessages_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "api/st_grpc/st_grpc.proto",
}

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

Functions

func RegisterLiveMessageServiceServer

func RegisterLiveMessageServiceServer(s grpc.ServiceRegistrar, srv LiveMessageServiceServer)

Types

type LiveMessage

type LiveMessage struct {
	Id        string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Author    string `protobuf:"bytes,2,opt,name=author,proto3" json:"author,omitempty"`
	AvatarUrl string `protobuf:"bytes,3,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
	Content   string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
	Timestamp int64  `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*LiveMessage) Descriptor deprecated

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

Deprecated: Use LiveMessage.ProtoReflect.Descriptor instead.

func (*LiveMessage) GetAuthor

func (x *LiveMessage) GetAuthor() string

func (*LiveMessage) GetAvatarUrl

func (x *LiveMessage) GetAvatarUrl() string

func (*LiveMessage) GetContent

func (x *LiveMessage) GetContent() string

func (*LiveMessage) GetId

func (x *LiveMessage) GetId() string

func (*LiveMessage) GetTimestamp

func (x *LiveMessage) GetTimestamp() int64

func (*LiveMessage) ProtoMessage

func (*LiveMessage) ProtoMessage()

func (*LiveMessage) ProtoReflect

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

func (*LiveMessage) Reset

func (x *LiveMessage) Reset()

func (*LiveMessage) String

func (x *LiveMessage) String() string

type LiveMessageServiceClient

type LiveMessageServiceClient interface {
	StreamMessages(ctx context.Context, in *StreamRequest, opts ...grpc.CallOption) (LiveMessageService_StreamMessagesClient, error)
}

LiveMessageServiceClient is the client API for LiveMessageService 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.

type LiveMessageServiceServer

type LiveMessageServiceServer interface {
	StreamMessages(*StreamRequest, LiveMessageService_StreamMessagesServer) error
	// contains filtered or unexported methods
}

LiveMessageServiceServer is the server API for LiveMessageService service. All implementations must embed UnimplementedLiveMessageServiceServer for forward compatibility

type LiveMessageService_StreamMessagesClient

type LiveMessageService_StreamMessagesClient interface {
	Recv() (*LiveMessage, error)
	grpc.ClientStream
}

type LiveMessageService_StreamMessagesServer

type LiveMessageService_StreamMessagesServer interface {
	Send(*LiveMessage) error
	grpc.ServerStream
}

type MessageProvider

type MessageProvider interface {
	StreamMessages(req *StreamRequest, messageChan chan<- *LiveMessage) error
}

type StreamRequest

type StreamRequest struct {
	ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamRequest) Descriptor deprecated

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

Deprecated: Use StreamRequest.ProtoReflect.Descriptor instead.

func (*StreamRequest) GetServiceName

func (x *StreamRequest) GetServiceName() string

func (*StreamRequest) ProtoMessage

func (*StreamRequest) ProtoMessage()

func (*StreamRequest) ProtoReflect

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

func (*StreamRequest) Reset

func (x *StreamRequest) Reset()

func (*StreamRequest) String

func (x *StreamRequest) String() string

type UnimplementedLiveMessageServiceServer

type UnimplementedLiveMessageServiceServer struct {
}

UnimplementedLiveMessageServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedLiveMessageServiceServer) StreamMessages

type UnsafeLiveMessageServiceServer

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

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

Jump to

Keyboard shortcuts

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