Documentation ¶
Index ¶
- Variables
- func RecordMetrics(start time.Time, funcName string)
- type Client
- func (c *Client) Close() error
- func (c *Client) Delete(req *kvs.DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (c *Client) Get(req *kvs.GetRequest, opts ...grpc.CallOption) (*kvs.GetResponse, error)
- func (c *Client) Join(req *raft.JoinRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (c *Client) Leave(req *raft.LeaveRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (c *Client) Put(req *kvs.PutRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (c *Client) Snapshot(opts ...grpc.CallOption) (*empty.Empty, error)
- type RootHandler
- type Server
- type Service
- func (s *Service) Delete(ctx context.Context, req *kvs.DeleteRequest) (*empty.Empty, error)
- func (s *Service) Get(ctx context.Context, req *kvs.GetRequest) (*kvs.GetResponse, error)
- func (s *Service) Join(ctx context.Context, req *raft.JoinRequest) (*empty.Empty, error)
- func (s *Service) Leave(ctx context.Context, req *raft.LeaveRequest) (*empty.Empty, error)
- func (s *Service) Put(ctx context.Context, req *kvs.PutRequest) (*empty.Empty, error)
- func (s *Service) Snapshot(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DurationSeconds = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: namespace, Subsystem: subsystem, Name: "duration_seconds", Help: "The index operation durations in seconds.", }, []string{ "func", }, ) OperationsTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: namespace, Subsystem: subsystem, Name: "operations_total", Help: "The number of index operations.", }, []string{ "func", }, ) )
Functions ¶
func RecordMetrics ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Delete ¶
func (c *Client) Delete(req *kvs.DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*Client) Get ¶
func (c *Client) Get(req *kvs.GetRequest, opts ...grpc.CallOption) (*kvs.GetResponse, error)
func (*Client) Join ¶
func (c *Client) Join(req *raft.JoinRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*Client) Leave ¶
func (c *Client) Leave(req *raft.LeaveRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*Client) Put ¶
func (c *Client) Put(req *kvs.PutRequest, opts ...grpc.CallOption) (*empty.Empty, error)
type RootHandler ¶
type RootHandler struct {
// contains filtered or unexported fields
}
func NewRootHandler ¶
func NewRootHandler(logger *log.Logger) *RootHandler
func (*RootHandler) ServeHTTP ¶
func (h *RootHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) Get ¶
func (s *Service) Get(ctx context.Context, req *kvs.GetRequest) (*kvs.GetResponse, error)
Click to show internal directories.
Click to hide internal directories.