Documentation
¶
Index ¶
- type ConnectionClosed
- type GRPCApi
- func (api *GRPCApi) Bufconn() *bufconn.Listener
- func (api GRPCApi) GetMessageHistory(ctx context.Context, history *pb.RequestMessageHistory) (*pb.MessageHistory, error)
- func (api *GRPCApi) HandleMessages(stream pb.Messages_HandleMessagesServer) error
- func (api *GRPCApi) Listen(lis net.Listener)
- func (api *GRPCApi) Login(ctx context.Context, in *pb.ClientAuth) (*pb.AuthAck, error)
- func (api *GRPCApi) Prepare()
- func (api *GRPCApi) Serve()
- type InvalidUsername
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionClosed ¶
type ConnectionClosed struct{}
func (ConnectionClosed) Error ¶
func (e ConnectionClosed) Error() string
type GRPCApi ¶
type GRPCApi struct { S *grpc.Server pb.UnimplementedAuthServer pb.UnimplementedMessagesServer // contains filtered or unexported fields }
func (GRPCApi) GetMessageHistory ¶
func (api GRPCApi) GetMessageHistory(ctx context.Context, history *pb.RequestMessageHistory) (*pb.MessageHistory, error)
func (*GRPCApi) HandleMessages ¶
func (api *GRPCApi) HandleMessages(stream pb.Messages_HandleMessagesServer) error
func (*GRPCApi) Login ¶
gRPC doesn't have any way of identifying clients, other than client metadata. To avoid cluttering all the protobuf requests with token parameters, and to avoid messy bidirectional stream workarounds, Fenix uses session tokens in metadata. Clients are expected to log in and then keep that session token in metadata, and renew when it expires. If anyone has a better solution, open an issue.
type InvalidUsername ¶
type InvalidUsername struct{}
func (InvalidUsername) Error ¶
func (e InvalidUsername) Error() string
Click to show internal directories.
Click to hide internal directories.