Documentation
¶
Index ¶
- func NewGRPCContext() (context.Context, context.CancelFunc)
- type GRPCClient
- func (c *GRPCClient) BulkDelete(req *index.BulkDeleteRequest, opts ...grpc.CallOption) (*index.BulkDeleteResponse, error)
- func (c *GRPCClient) BulkIndex(req *index.BulkIndexRequest, opts ...grpc.CallOption) (*index.BulkIndexResponse, error)
- func (c *GRPCClient) Cancel()
- func (c *GRPCClient) Close() error
- func (c *GRPCClient) ClusterInfo(req *empty.Empty, opts ...grpc.CallOption) (*index.ClusterInfoResponse, error)
- func (c *GRPCClient) ClusterJoin(req *index.ClusterJoinRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (c *GRPCClient) ClusterLeave(req *index.ClusterLeaveRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (c *GRPCClient) ClusterWatch(req *empty.Empty, opts ...grpc.CallOption) (index.Index_ClusterWatchClient, error)
- func (c *GRPCClient) Delete(req *index.DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (c *GRPCClient) Get(req *index.GetRequest, opts ...grpc.CallOption) (*index.GetResponse, error)
- func (c *GRPCClient) GetAddress() string
- func (c *GRPCClient) GetIndexConfig(req *empty.Empty, opts ...grpc.CallOption) (*index.GetIndexConfigResponse, error)
- func (c *GRPCClient) GetIndexStats(req *empty.Empty, opts ...grpc.CallOption) (*index.GetIndexStatsResponse, error)
- func (c *GRPCClient) Index(req *index.IndexRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (c *GRPCClient) NodeHealthCheck(req *index.NodeHealthCheckRequest, opts ...grpc.CallOption) (*index.NodeHealthCheckResponse, error)
- func (c *GRPCClient) NodeInfo(req *empty.Empty, opts ...grpc.CallOption) (*index.NodeInfoResponse, error)
- func (c *GRPCClient) Search(req *index.SearchRequest, opts ...grpc.CallOption) (*index.SearchResponse, error)
- func (c *GRPCClient) Snapshot(req *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
- type GRPCGateway
- type GRPCServer
- type GRPCService
- func (s *GRPCService) BulkDelete(ctx context.Context, req *index.BulkDeleteRequest) (*index.BulkDeleteResponse, error)
- func (s *GRPCService) BulkIndex(ctx context.Context, req *index.BulkIndexRequest) (*index.BulkIndexResponse, error)
- func (s *GRPCService) ClusterInfo(ctx context.Context, req *empty.Empty) (*index.ClusterInfoResponse, error)
- func (s *GRPCService) ClusterJoin(ctx context.Context, req *index.ClusterJoinRequest) (*empty.Empty, error)
- func (s *GRPCService) ClusterLeave(ctx context.Context, req *index.ClusterLeaveRequest) (*empty.Empty, error)
- func (s *GRPCService) ClusterWatch(req *empty.Empty, server index.Index_ClusterWatchServer) error
- func (s *GRPCService) Delete(ctx context.Context, req *index.DeleteRequest) (*empty.Empty, error)
- func (s *GRPCService) Get(ctx context.Context, req *index.GetRequest) (*index.GetResponse, error)
- func (s *GRPCService) GetIndexConfig(ctx context.Context, req *empty.Empty) (*index.GetIndexConfigResponse, error)
- func (s *GRPCService) GetIndexStats(ctx context.Context, req *empty.Empty) (*index.GetIndexStatsResponse, error)
- func (s *GRPCService) Index(ctx context.Context, req *index.IndexRequest) (*empty.Empty, error)
- func (s *GRPCService) NodeHealthCheck(ctx context.Context, req *index.NodeHealthCheckRequest) (*index.NodeHealthCheckResponse, error)
- func (s *GRPCService) NodeID() string
- func (s *GRPCService) NodeInfo(ctx context.Context, req *empty.Empty) (*index.NodeInfoResponse, error)
- func (s *GRPCService) Search(ctx context.Context, req *index.SearchRequest) (*index.SearchResponse, error)
- func (s *GRPCService) Snapshot(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (s *GRPCService) Start() error
- func (s *GRPCService) Stop() error
- type HTTPServer
- type Index
- func (i *Index) BulkDelete(ids []string) (int, error)
- func (i *Index) BulkIndex(docs []*index.Document) (int, error)
- func (i *Index) Close() error
- func (i *Index) Config() (map[string]interface{}, error)
- func (i *Index) Delete(id string) error
- func (i *Index) Get(id string) (map[string]interface{}, error)
- func (i *Index) Index(doc *index.Document) error
- func (i *Index) Search(request *bleve.SearchRequest) (*bleve.SearchResult, error)
- func (i *Index) SnapshotItems() <-chan *index.Document
- func (i *Index) Stats() (map[string]interface{}, error)
- 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 RaftFSM
- func (f *RaftFSM) Apply(l *raft.Log) interface{}
- func (f *RaftFSM) BulkDelete(ids []string) (int, error)
- func (f *RaftFSM) BulkIndex(docs []*index.Document) (int, error)
- func (f *RaftFSM) Delete(id string) error
- func (f *RaftFSM) DeleteNode(nodeId string) error
- func (f *RaftFSM) GetDocument(id string) (map[string]interface{}, error)
- func (f *RaftFSM) GetIndexConfig() (map[string]interface{}, error)
- func (f *RaftFSM) GetIndexStats() (map[string]interface{}, error)
- func (f *RaftFSM) GetNode(nodeId string) (*index.Node, error)
- func (f *RaftFSM) Index(doc *index.Document) error
- func (f *RaftFSM) Restore(rc io.ReadCloser) error
- func (f *RaftFSM) Search(request *bleve.SearchRequest) (*bleve.SearchResult, error)
- func (f *RaftFSM) SetNode(node *index.Node) error
- func (f *RaftFSM) Snapshot() (raft.FSMSnapshot, error)
- func (f *RaftFSM) Start() error
- func (f *RaftFSM) Stop() error
- type RaftFSMSnapshot
- type RaftServer
- func (s *RaftServer) BulkDelete(ids []string) (int, error)
- func (s *RaftServer) BulkIndex(docs []*index.Document) (int, error)
- func (s *RaftServer) Delete(id string) error
- func (s *RaftServer) DeleteNode(nodeId string) error
- func (s *RaftServer) Get(id string) (map[string]interface{}, error)
- func (s *RaftServer) GetCluster() (*index.Cluster, error)
- func (s *RaftServer) GetIndexConfig() (map[string]interface{}, error)
- func (s *RaftServer) GetIndexStats() (map[string]interface{}, error)
- func (s *RaftServer) GetNode(id string) (*index.Node, error)
- func (s *RaftServer) Index(doc *index.Document) error
- func (s *RaftServer) IsLeader() bool
- func (s *RaftServer) LeaderAddress(timeout time.Duration) (raft.ServerAddress, error)
- func (s *RaftServer) LeaderID(timeout time.Duration) (raft.ServerID, error)
- func (s *RaftServer) NodeAddress() string
- func (s *RaftServer) NodeID() string
- func (s *RaftServer) Search(request *bleve.SearchRequest) (*bleve.SearchResult, error)
- func (s *RaftServer) SetNode(node *index.Node) error
- func (s *RaftServer) Snapshot() error
- func (s *RaftServer) Start() error
- func (s *RaftServer) State() raft.RaftState
- func (s *RaftServer) Stats() map[string]string
- func (s *RaftServer) Stop() error
- func (s *RaftServer) WaitForDetectLeader(timeout time.Duration) 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 *index.BulkDeleteRequest, opts ...grpc.CallOption) (*index.BulkDeleteResponse, error)
func (*GRPCClient) BulkIndex ¶ added in v0.8.0
func (c *GRPCClient) BulkIndex(req *index.BulkIndexRequest, opts ...grpc.CallOption) (*index.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) ClusterInfo ¶ added in v0.8.0
func (c *GRPCClient) ClusterInfo(req *empty.Empty, opts ...grpc.CallOption) (*index.ClusterInfoResponse, error)
func (*GRPCClient) ClusterJoin ¶ added in v0.8.0
func (c *GRPCClient) ClusterJoin(req *index.ClusterJoinRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*GRPCClient) ClusterLeave ¶ added in v0.8.0
func (c *GRPCClient) ClusterLeave(req *index.ClusterLeaveRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*GRPCClient) ClusterWatch ¶ added in v0.8.0
func (c *GRPCClient) ClusterWatch(req *empty.Empty, opts ...grpc.CallOption) (index.Index_ClusterWatchClient, error)
func (*GRPCClient) Delete ¶ added in v0.8.0
func (c *GRPCClient) Delete(req *index.DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*GRPCClient) Get ¶ added in v0.8.0
func (c *GRPCClient) Get(req *index.GetRequest, opts ...grpc.CallOption) (*index.GetResponse, error)
func (*GRPCClient) GetAddress ¶ added in v0.8.0
func (c *GRPCClient) GetAddress() string
func (*GRPCClient) GetIndexConfig ¶ added in v0.8.0
func (c *GRPCClient) GetIndexConfig(req *empty.Empty, opts ...grpc.CallOption) (*index.GetIndexConfigResponse, error)
func (*GRPCClient) GetIndexStats ¶ added in v0.8.0
func (c *GRPCClient) GetIndexStats(req *empty.Empty, opts ...grpc.CallOption) (*index.GetIndexStatsResponse, error)
func (*GRPCClient) Index ¶ added in v0.8.0
func (c *GRPCClient) Index(req *index.IndexRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*GRPCClient) NodeHealthCheck ¶ added in v0.8.0
func (c *GRPCClient) NodeHealthCheck(req *index.NodeHealthCheckRequest, opts ...grpc.CallOption) (*index.NodeHealthCheckResponse, error)
func (*GRPCClient) NodeInfo ¶ added in v0.8.0
func (c *GRPCClient) NodeInfo(req *empty.Empty, opts ...grpc.CallOption) (*index.NodeInfoResponse, error)
func (*GRPCClient) Search ¶ added in v0.8.0
func (c *GRPCClient) Search(req *index.SearchRequest, opts ...grpc.CallOption) (*index.SearchResponse, error)
func (*GRPCClient) Snapshot ¶ added in v0.8.0
func (c *GRPCClient) Snapshot(req *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, 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 index.IndexServer, 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, shardId string, raftServer *RaftServer, logger *zap.Logger) (*GRPCService, error)
func (*GRPCService) BulkDelete ¶ added in v0.8.0
func (s *GRPCService) BulkDelete(ctx context.Context, req *index.BulkDeleteRequest) (*index.BulkDeleteResponse, error)
func (*GRPCService) BulkIndex ¶ added in v0.8.0
func (s *GRPCService) BulkIndex(ctx context.Context, req *index.BulkIndexRequest) (*index.BulkIndexResponse, error)
func (*GRPCService) ClusterInfo ¶ added in v0.8.0
func (s *GRPCService) ClusterInfo(ctx context.Context, req *empty.Empty) (*index.ClusterInfoResponse, error)
func (*GRPCService) ClusterJoin ¶ added in v0.8.0
func (s *GRPCService) ClusterJoin(ctx context.Context, req *index.ClusterJoinRequest) (*empty.Empty, error)
func (*GRPCService) ClusterLeave ¶ added in v0.8.0
func (s *GRPCService) ClusterLeave(ctx context.Context, req *index.ClusterLeaveRequest) (*empty.Empty, error)
func (*GRPCService) ClusterWatch ¶ added in v0.8.0
func (s *GRPCService) ClusterWatch(req *empty.Empty, server index.Index_ClusterWatchServer) error
func (*GRPCService) Delete ¶ added in v0.8.0
func (s *GRPCService) Delete(ctx context.Context, req *index.DeleteRequest) (*empty.Empty, error)
func (*GRPCService) Get ¶ added in v0.8.0
func (s *GRPCService) Get(ctx context.Context, req *index.GetRequest) (*index.GetResponse, error)
func (*GRPCService) GetIndexConfig ¶
func (s *GRPCService) GetIndexConfig(ctx context.Context, req *empty.Empty) (*index.GetIndexConfigResponse, error)
func (*GRPCService) GetIndexStats ¶
func (s *GRPCService) GetIndexStats(ctx context.Context, req *empty.Empty) (*index.GetIndexStatsResponse, error)
func (*GRPCService) Index ¶ added in v0.8.0
func (s *GRPCService) Index(ctx context.Context, req *index.IndexRequest) (*empty.Empty, error)
func (*GRPCService) NodeHealthCheck ¶ added in v0.8.0
func (s *GRPCService) NodeHealthCheck(ctx context.Context, req *index.NodeHealthCheckRequest) (*index.NodeHealthCheckResponse, error)
func (*GRPCService) NodeID ¶ added in v0.7.1
func (s *GRPCService) NodeID() string
func (*GRPCService) NodeInfo ¶ added in v0.8.0
func (s *GRPCService) NodeInfo(ctx context.Context, req *empty.Empty) (*index.NodeInfoResponse, error)
func (*GRPCService) Search ¶
func (s *GRPCService) Search(ctx context.Context, req *index.SearchRequest) (*index.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 Index ¶
type Index struct {
// contains filtered or unexported fields
}
func (*Index) Search ¶
func (i *Index) Search(request *bleve.SearchRequest) (*bleve.SearchResult, error)
func (*Index) SnapshotItems ¶
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 RaftFSM ¶
type RaftFSM struct {
// contains filtered or unexported fields
}
func NewRaftFSM ¶
func (*RaftFSM) BulkDelete ¶ added in v0.8.0
func (*RaftFSM) DeleteNode ¶ added in v0.8.0
func (*RaftFSM) GetDocument ¶
func (*RaftFSM) GetIndexConfig ¶
func (*RaftFSM) GetIndexStats ¶
func (*RaftFSM) Search ¶
func (f *RaftFSM) Search(request *bleve.SearchRequest) (*bleve.SearchResult, error)
type RaftFSMSnapshot ¶ added in v0.7.1
type RaftFSMSnapshot struct {
// contains filtered or unexported fields
}
func (*RaftFSMSnapshot) Persist ¶ added in v0.7.1
func (f *RaftFSMSnapshot) Persist(sink raft.SnapshotSink) error
func (*RaftFSMSnapshot) Release ¶ added in v0.7.1
func (f *RaftFSMSnapshot) Release()
type RaftServer ¶
type RaftServer struct {
// contains filtered or unexported fields
}
func NewRaftServer ¶
func (*RaftServer) BulkDelete ¶ added in v0.8.0
func (s *RaftServer) BulkDelete(ids []string) (int, error)
func (*RaftServer) BulkIndex ¶ added in v0.8.0
func (s *RaftServer) BulkIndex(docs []*index.Document) (int, error)
func (*RaftServer) Delete ¶ added in v0.8.0
func (s *RaftServer) Delete(id string) error
func (*RaftServer) DeleteNode ¶ added in v0.7.1
func (s *RaftServer) DeleteNode(nodeId string) error
func (*RaftServer) Get ¶ added in v0.8.0
func (s *RaftServer) Get(id string) (map[string]interface{}, error)
func (*RaftServer) GetCluster ¶ added in v0.7.1
func (s *RaftServer) GetCluster() (*index.Cluster, error)
func (*RaftServer) GetIndexConfig ¶
func (s *RaftServer) GetIndexConfig() (map[string]interface{}, error)
func (*RaftServer) GetIndexStats ¶
func (s *RaftServer) GetIndexStats() (map[string]interface{}, error)
func (*RaftServer) GetNode ¶ added in v0.7.1
func (s *RaftServer) GetNode(id string) (*index.Node, error)
func (*RaftServer) IsLeader ¶
func (s *RaftServer) IsLeader() bool
func (*RaftServer) LeaderAddress ¶
func (s *RaftServer) LeaderAddress(timeout time.Duration) (raft.ServerAddress, error)
func (*RaftServer) NodeAddress ¶ added in v0.8.0
func (s *RaftServer) NodeAddress() string
func (*RaftServer) NodeID ¶ added in v0.7.1
func (s *RaftServer) NodeID() string
func (*RaftServer) Search ¶
func (s *RaftServer) Search(request *bleve.SearchRequest) (*bleve.SearchResult, error)
func (*RaftServer) Snapshot ¶
func (s *RaftServer) Snapshot() error
func (*RaftServer) Start ¶
func (s *RaftServer) Start() error
func (*RaftServer) State ¶
func (s *RaftServer) State() raft.RaftState
func (*RaftServer) Stats ¶
func (s *RaftServer) Stats() map[string]string
func (*RaftServer) Stop ¶
func (s *RaftServer) Stop() error
func (*RaftServer) WaitForDetectLeader ¶
func (s *RaftServer) WaitForDetectLeader(timeout time.Duration) error
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 Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(managerGrpcAddress string, shardId string, peerGrpcAddress string, node *index.Node, dataDir string, raftStorageType string, indexMapping *mapping.IndexMappingImpl, indexType string, indexStorageType string, logger *zap.Logger, grpcLogger *zap.Logger, httpLogger accesslog.Logger) (*Server, error)
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".