Documentation
¶
Index ¶
- func InitServer() error
- func InitStore(storeDBPath string) error
- func NewInsecureGrpcServer(host string, port string) (*grpc.Server, chan error)
- func NewMutualTLSGrpcServer(host string, port string, certFile string, keyFile string, caCertFile string) (*grpc.Server, chan error)
- func PprintMeta(md metadata.MD)
- func ShutdownServer() error
- type Error
- type Server
- func (s *Server) CreateItem(ctx context.Context, req *go_ltp.CreateItemRequest) (*go_ltp.CreateItemResponse, error)
- func (s *Server) GetItem(ctx context.Context, req *go_ltp.GetItemRequest) (*go_ltp.GetItemResponse, error)
- func (s *Server) GetServerInfo(ctx context.Context, in *go_ltp.Empty) (*go_ltp.ServerInfoResponse, error)
- func (s *Server) GetType(ctx context.Context, req *go_ltp.GetTypeRequest) (*go_ltp.GetTypeResponse, error)
- func (s *Server) GetVersion(ctx context.Context, in *go_ltp.Empty) (*go_ltp.VersionResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitServer ¶
func InitServer() error
func NewInsecureGrpcServer ¶
Creates a new server with mandatory mutual-TLS authentication
func NewMutualTLSGrpcServer ¶
func NewMutualTLSGrpcServer(host string, port string, certFile string, keyFile string, caCertFile string) (*grpc.Server, chan error)
Creates a new server with mandatory mutual-TLS authentication
func ShutdownServer ¶
func ShutdownServer() error
Types ¶
type Error ¶
type Error struct { // Code is the canonical error code for describing the nature of a // particular error. Code codes.Code // Desc explains more details of the error. Desc string }
Error is the structured error returned from the server
type Server ¶
type Server struct{}
func (*Server) CreateItem ¶
func (s *Server) CreateItem(ctx context.Context, req *go_ltp.CreateItemRequest) (*go_ltp.CreateItemResponse, error)
func (*Server) GetItem ¶
func (s *Server) GetItem(ctx context.Context, req *go_ltp.GetItemRequest) (*go_ltp.GetItemResponse, error)
func (*Server) GetServerInfo ¶
func (s *Server) GetServerInfo(ctx context.Context, in *go_ltp.Empty) (*go_ltp.ServerInfoResponse, error)
Provide some diagnostic information (items stored, etc)
func (*Server) GetType ¶
func (s *Server) GetType(ctx context.Context, req *go_ltp.GetTypeRequest) (*go_ltp.GetTypeResponse, error)
Return the Type objects for a given item
func (*Server) GetVersion ¶
Return a version string to the user
Click to show internal directories.
Click to hide internal directories.