Documentation ¶
Index ¶
- func Authenticate(ctx context.Context) (context.Context, error)
- func NewGRPCServer(config *Config, options ...grpc.ServerOption) (*grpc.Server, error)
- func Subject(ctx context.Context) string
- type Authorizer
- type CommitLog
- type Config
- type Server
- func (server *Server) Consume(ctx context.Context, request *proto.ConsumeRequest) (*proto.ConsumeResponse, error)
- func (server *Server) ConsumeStream(request *proto.ConsumeRequest, stream proto.Log_ConsumeStreamServer) error
- func (server *Server) Produce(ctx context.Context, request *proto.ProduceRequest) (*proto.ProduceResponse, error)
- func (server *Server) ProduceStream(stream proto.Log_ProduceStreamServer) error
- type SubjectContextKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authenticate ¶
Authenticate authenticates the peer and returns the context
func NewGRPCServer ¶
NewGRPCServer creates a new gRPC server
Types ¶
type Authorizer ¶
Authorizer is the interface that wraps the basic Authorize method
type Config ¶
type Config struct { CommitLog CommitLog Authorizer Authorizer }
Config contains the configuration for gRPC
type Server ¶
type Server struct { proto.UnimplementedLogServer *Config }
Server is a wrapper around proto.LogServer and Config
func (*Server) Consume ¶
func (server *Server) Consume(ctx context.Context, request *proto.ConsumeRequest) (*proto.ConsumeResponse, error)
Consume is the implementation of the Consume RPC
func (*Server) ConsumeStream ¶
func (server *Server) ConsumeStream(request *proto.ConsumeRequest, stream proto.Log_ConsumeStreamServer) error
ConsumeStream is the implementation of the ConsumeStream RPC
func (*Server) Produce ¶
func (server *Server) Produce(ctx context.Context, request *proto.ProduceRequest) (*proto.ProduceResponse, error)
Produce is the implementation of the Produce RPC
func (*Server) ProduceStream ¶
ProduceStream is the implementation of the ProduceStream RPC
type SubjectContextKey ¶
type SubjectContextKey struct{}
SubjectContextKey returns the subject from the context
Click to show internal directories.
Click to hide internal directories.