Documentation
¶
Index ¶
- func NewGRPCContext() (context.Context, context.CancelFunc)
- type GRPCClient
- func (c *GRPCClient) BulkDelete(req *distribute.BulkDeleteRequest, opts ...grpc.CallOption) (*distribute.BulkDeleteResponse, error)
- func (c *GRPCClient) BulkIndex(req *distribute.BulkIndexRequest, opts ...grpc.CallOption) (*distribute.BulkIndexResponse, error)
- func (c *GRPCClient) Cancel()
- func (c *GRPCClient) Close() error
- func (c *GRPCClient) Delete(req *distribute.DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (c *GRPCClient) Get(req *distribute.GetRequest, opts ...grpc.CallOption) (*distribute.GetResponse, error)
- func (c *GRPCClient) GetAddress() string
- func (c *GRPCClient) Index(req *distribute.IndexRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (c *GRPCClient) NodeHealthCheck(req *distribute.NodeHealthCheckRequest, opts ...grpc.CallOption) (*distribute.NodeHealthCheckResponse, error)
- func (c *GRPCClient) Search(req *distribute.SearchRequest, opts ...grpc.CallOption) (*distribute.SearchResponse, error)
- type GRPCGateway
- type GRPCServer
- type GRPCService
- func (s *GRPCService) BulkDelete(ctx context.Context, req *distribute.BulkDeleteRequest) (*distribute.BulkDeleteResponse, error)
- func (s *GRPCService) BulkIndex(ctx context.Context, req *distribute.BulkIndexRequest) (*distribute.BulkIndexResponse, error)
- func (s *GRPCService) Delete(ctx context.Context, req *distribute.DeleteRequest) (*empty.Empty, error)
- func (s *GRPCService) Get(ctx context.Context, req *distribute.GetRequest) (*distribute.GetResponse, error)
- func (s *GRPCService) Index(ctx context.Context, req *distribute.IndexRequest) (*empty.Empty, error)
- func (s *GRPCService) NodeHealthCheck(ctx context.Context, req *distribute.NodeHealthCheckRequest) (*distribute.NodeHealthCheckResponse, error)
- func (s *GRPCService) Search(ctx context.Context, req *distribute.SearchRequest) (*distribute.SearchResponse, error)
- func (s *GRPCService) Start() error
- func (s *GRPCService) Stop() error
- type HTTPServer
- type JsonMarshaler
- func (*JsonMarshaler) ContentType() string
- func (j *JsonMarshaler) Delimiter() []byte
- func (j *JsonMarshaler) Marshal(v interface{}) ([]byte, error)
- func (j *JsonMarshaler) NewDecoder(r io.Reader) runtime.Decoder
- func (j *JsonMarshaler) NewEncoder(w io.Writer) runtime.Encoder
- func (j *JsonMarshaler) Unmarshal(data []byte, v interface{}) error
- type JsonlMarshaler
- func (*JsonlMarshaler) ContentType() string
- func (j *JsonlMarshaler) Delimiter() []byte
- func (j *JsonlMarshaler) Marshal(v interface{}) ([]byte, error)
- func (j *JsonlMarshaler) NewDecoder(r io.Reader) runtime.Decoder
- func (j *JsonlMarshaler) NewEncoder(w io.Writer) runtime.Encoder
- func (j *JsonlMarshaler) Unmarshal(data []byte, v interface{}) error
- type RootHandler
- type Router
- type Server
- type TextMarshaler
- func (*TextMarshaler) ContentType() string
- func (j *TextMarshaler) Delimiter() []byte
- func (j *TextMarshaler) Marshal(v interface{}) ([]byte, error)
- func (j *TextMarshaler) NewDecoder(r io.Reader) runtime.Decoder
- func (j *TextMarshaler) NewEncoder(w io.Writer) runtime.Encoder
- func (j *TextMarshaler) Unmarshal(data []byte, v interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGRPCContext ¶ added in v0.8.0
func NewGRPCContext() (context.Context, context.CancelFunc)
Types ¶
type GRPCClient ¶ added in v0.8.0
type GRPCClient struct {
// contains filtered or unexported fields
}
func NewGRPCClient ¶ added in v0.8.0
func NewGRPCClient(address string) (*GRPCClient, error)
func (*GRPCClient) BulkDelete ¶ added in v0.8.0
func (c *GRPCClient) BulkDelete(req *distribute.BulkDeleteRequest, opts ...grpc.CallOption) (*distribute.BulkDeleteResponse, error)
func (*GRPCClient) BulkIndex ¶ added in v0.8.0
func (c *GRPCClient) BulkIndex(req *distribute.BulkIndexRequest, opts ...grpc.CallOption) (*distribute.BulkIndexResponse, error)
func (*GRPCClient) Cancel ¶ added in v0.8.0
func (c *GRPCClient) Cancel()
func (*GRPCClient) Close ¶ added in v0.8.0
func (c *GRPCClient) Close() error
func (*GRPCClient) Delete ¶ added in v0.8.0
func (c *GRPCClient) Delete(req *distribute.DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*GRPCClient) Get ¶ added in v0.8.0
func (c *GRPCClient) Get(req *distribute.GetRequest, opts ...grpc.CallOption) (*distribute.GetResponse, error)
func (*GRPCClient) GetAddress ¶ added in v0.8.0
func (c *GRPCClient) GetAddress() string
func (*GRPCClient) Index ¶ added in v0.8.0
func (c *GRPCClient) Index(req *distribute.IndexRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*GRPCClient) NodeHealthCheck ¶ added in v0.8.0
func (c *GRPCClient) NodeHealthCheck(req *distribute.NodeHealthCheckRequest, opts ...grpc.CallOption) (*distribute.NodeHealthCheckResponse, error)
func (*GRPCClient) Search ¶ added in v0.8.0
func (c *GRPCClient) Search(req *distribute.SearchRequest, opts ...grpc.CallOption) (*distribute.SearchResponse, error)
type GRPCGateway ¶ added in v0.8.0
type GRPCGateway struct {
// contains filtered or unexported fields
}
func NewGRPCGateway ¶ added in v0.8.0
func (*GRPCGateway) GetAddress ¶ added in v0.8.0
func (s *GRPCGateway) GetAddress() (string, error)
func (*GRPCGateway) Start ¶ added in v0.8.0
func (s *GRPCGateway) Start() error
func (*GRPCGateway) Stop ¶ added in v0.8.0
func (s *GRPCGateway) Stop() error
type GRPCServer ¶ added in v0.8.0
type GRPCServer struct {
// contains filtered or unexported fields
}
func NewGRPCServer ¶ added in v0.8.0
func NewGRPCServer(grpcAddr string, service distribute.DistributeServer, logger *zap.Logger) (*GRPCServer, error)
func (*GRPCServer) Start ¶ added in v0.8.0
func (s *GRPCServer) Start() error
func (*GRPCServer) Stop ¶ added in v0.8.0
func (s *GRPCServer) Stop() error
type GRPCService ¶
type GRPCService struct {
// contains filtered or unexported fields
}
func NewGRPCService ¶
func NewGRPCService(managerGrpcAddress string, logger *zap.Logger) (*GRPCService, error)
func (*GRPCService) BulkDelete ¶ added in v0.8.0
func (s *GRPCService) BulkDelete(ctx context.Context, req *distribute.BulkDeleteRequest) (*distribute.BulkDeleteResponse, error)
func (*GRPCService) BulkIndex ¶ added in v0.8.0
func (s *GRPCService) BulkIndex(ctx context.Context, req *distribute.BulkIndexRequest) (*distribute.BulkIndexResponse, error)
func (*GRPCService) Delete ¶ added in v0.8.0
func (s *GRPCService) Delete(ctx context.Context, req *distribute.DeleteRequest) (*empty.Empty, error)
func (*GRPCService) Get ¶ added in v0.8.0
func (s *GRPCService) Get(ctx context.Context, req *distribute.GetRequest) (*distribute.GetResponse, error)
func (*GRPCService) Index ¶ added in v0.8.0
func (s *GRPCService) Index(ctx context.Context, req *distribute.IndexRequest) (*empty.Empty, error)
func (*GRPCService) NodeHealthCheck ¶ added in v0.8.0
func (s *GRPCService) NodeHealthCheck(ctx context.Context, req *distribute.NodeHealthCheckRequest) (*distribute.NodeHealthCheckResponse, error)
func (*GRPCService) Search ¶
func (s *GRPCService) Search(ctx context.Context, req *distribute.SearchRequest) (*distribute.SearchResponse, error)
func (*GRPCService) Start ¶
func (s *GRPCService) Start() error
func (*GRPCService) Stop ¶
func (s *GRPCService) Stop() error
type HTTPServer ¶ added in v0.8.0
type HTTPServer struct {
// contains filtered or unexported fields
}
func NewHTTPServer ¶ added in v0.8.0
func (*HTTPServer) Start ¶ added in v0.8.0
func (s *HTTPServer) Start() error
func (*HTTPServer) Stop ¶ added in v0.8.0
func (s *HTTPServer) Stop() error
type JsonMarshaler ¶ added in v0.8.0
type JsonMarshaler struct{}
func (*JsonMarshaler) ContentType ¶ added in v0.8.0
func (*JsonMarshaler) ContentType() string
ContentType always Returns "application/json".
func (*JsonMarshaler) Delimiter ¶ added in v0.8.0
func (j *JsonMarshaler) Delimiter() []byte
Delimiter for newline encoded JSON streams.
func (*JsonMarshaler) Marshal ¶ added in v0.8.0
func (j *JsonMarshaler) Marshal(v interface{}) ([]byte, error)
Marshal marshals "v" into JSON
func (*JsonMarshaler) NewDecoder ¶ added in v0.8.0
func (j *JsonMarshaler) NewDecoder(r io.Reader) runtime.Decoder
NewDecoder returns a Decoder which reads JSON stream from "r".
func (*JsonMarshaler) NewEncoder ¶ added in v0.8.0
func (j *JsonMarshaler) NewEncoder(w io.Writer) runtime.Encoder
NewEncoder returns an Encoder which writes JSON stream into "w".
func (*JsonMarshaler) Unmarshal ¶ added in v0.8.0
func (j *JsonMarshaler) Unmarshal(data []byte, v interface{}) error
Unmarshal unmarshals JSON data into "v".
type JsonlMarshaler ¶ added in v0.8.0
type JsonlMarshaler struct{}
func (*JsonlMarshaler) ContentType ¶ added in v0.8.0
func (*JsonlMarshaler) ContentType() string
ContentType always Returns "application/json".
func (*JsonlMarshaler) Delimiter ¶ added in v0.8.0
func (j *JsonlMarshaler) Delimiter() []byte
Delimiter for newline encoded JSON streams.
func (*JsonlMarshaler) Marshal ¶ added in v0.8.0
func (j *JsonlMarshaler) Marshal(v interface{}) ([]byte, error)
Marshal marshals "v" into JSON
func (*JsonlMarshaler) NewDecoder ¶ added in v0.8.0
func (j *JsonlMarshaler) NewDecoder(r io.Reader) runtime.Decoder
NewDecoder returns a Decoder which reads JSON-LINE stream from "r".
func (*JsonlMarshaler) NewEncoder ¶ added in v0.8.0
func (j *JsonlMarshaler) NewEncoder(w io.Writer) runtime.Encoder
NewEncoder returns an Encoder which writes JSON stream into "w".
func (*JsonlMarshaler) Unmarshal ¶ added in v0.8.0
func (j *JsonlMarshaler) Unmarshal(data []byte, v interface{}) error
Unmarshal unmarshals JSON data into "v".
type RootHandler ¶
type RootHandler struct {
// contains filtered or unexported fields
}
func NewRootHandler ¶
func NewRootHandler(logger *zap.Logger) *RootHandler
func (*RootHandler) ServeHTTP ¶
func (h *RootHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type TextMarshaler ¶ added in v0.8.0
type TextMarshaler struct{}
func (*TextMarshaler) ContentType ¶ added in v0.8.0
func (*TextMarshaler) ContentType() string
ContentType always Returns "application/json".
func (*TextMarshaler) Delimiter ¶ added in v0.8.0
func (j *TextMarshaler) Delimiter() []byte
Delimiter for newline encoded JSON streams.
func (*TextMarshaler) Marshal ¶ added in v0.8.0
func (j *TextMarshaler) Marshal(v interface{}) ([]byte, error)
Marshal marshals "v" into JSON
func (*TextMarshaler) NewDecoder ¶ added in v0.8.0
func (j *TextMarshaler) NewDecoder(r io.Reader) runtime.Decoder
NewDecoder returns a Decoder which reads text stream from "r".
func (*TextMarshaler) NewEncoder ¶ added in v0.8.0
func (j *TextMarshaler) NewEncoder(w io.Writer) runtime.Encoder
NewEncoder returns an Encoder which writes JSON stream into "w".
func (*TextMarshaler) Unmarshal ¶ added in v0.8.0
func (j *TextMarshaler) Unmarshal(data []byte, v interface{}) error
Unmarshal unmarshals JSON data into "v".