Documentation ¶
Index ¶
- func RegisterStatsHandler(s server.Server, hdlr StatsHandler, opts ...server.HandlerOption) error
- type Node
- func (*Node) Descriptor() ([]byte, []int)
- func (m *Node) GetAddress() string
- func (m *Node) GetId() string
- func (*Node) ProtoMessage()
- func (m *Node) Reset()
- func (m *Node) String() string
- func (m *Node) XXX_DiscardUnknown()
- func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Node) XXX_Merge(src proto.Message)
- func (m *Node) XXX_Size() int
- func (m *Node) XXX_Unmarshal(b []byte) error
- type ReadRequest
- func (*ReadRequest) Descriptor() ([]byte, []int)
- func (m *ReadRequest) GetService() *Service
- func (*ReadRequest) ProtoMessage()
- func (m *ReadRequest) Reset()
- func (m *ReadRequest) String() string
- func (m *ReadRequest) XXX_DiscardUnknown()
- func (m *ReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReadRequest) XXX_Merge(src proto.Message)
- func (m *ReadRequest) XXX_Size() int
- func (m *ReadRequest) XXX_Unmarshal(b []byte) error
- type ReadResponse
- func (*ReadResponse) Descriptor() ([]byte, []int)
- func (m *ReadResponse) GetStats() []*Snapshot
- func (*ReadResponse) ProtoMessage()
- func (m *ReadResponse) Reset()
- func (m *ReadResponse) String() string
- func (m *ReadResponse) XXX_DiscardUnknown()
- func (m *ReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReadResponse) XXX_Merge(src proto.Message)
- func (m *ReadResponse) XXX_Size() int
- func (m *ReadResponse) XXX_Unmarshal(b []byte) error
- type Service
- func (*Service) Descriptor() ([]byte, []int)
- func (m *Service) GetName() string
- func (m *Service) GetNode() *Node
- func (m *Service) GetVersion() string
- func (*Service) ProtoMessage()
- func (m *Service) Reset()
- func (m *Service) String() string
- func (m *Service) XXX_DiscardUnknown()
- func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Service) XXX_Merge(src proto.Message)
- func (m *Service) XXX_Size() int
- func (m *Service) XXX_Unmarshal(b []byte) error
- type Snapshot
- func (*Snapshot) Descriptor() ([]byte, []int)
- func (m *Snapshot) GetErrors() uint64
- func (m *Snapshot) GetGc() uint64
- func (m *Snapshot) GetMemory() uint64
- func (m *Snapshot) GetRequests() uint64
- func (m *Snapshot) GetService() *Service
- func (m *Snapshot) GetStarted() int64
- func (m *Snapshot) GetThreads() uint64
- func (m *Snapshot) GetUptime() uint64
- func (*Snapshot) ProtoMessage()
- func (m *Snapshot) Reset()
- func (m *Snapshot) String() string
- func (m *Snapshot) XXX_DiscardUnknown()
- func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Snapshot) XXX_Merge(src proto.Message)
- func (m *Snapshot) XXX_Size() int
- func (m *Snapshot) XXX_Unmarshal(b []byte) error
- type StatsHandler
- type StatsService
- type Stats_StreamService
- type Stats_StreamStream
- type StreamRequest
- func (*StreamRequest) Descriptor() ([]byte, []int)
- func (m *StreamRequest) GetNamespace() string
- func (m *StreamRequest) GetService() *Service
- func (*StreamRequest) ProtoMessage()
- func (m *StreamRequest) Reset()
- func (m *StreamRequest) String() string
- func (m *StreamRequest) XXX_DiscardUnknown()
- func (m *StreamRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamRequest) XXX_Merge(src proto.Message)
- func (m *StreamRequest) XXX_Size() int
- func (m *StreamRequest) XXX_Unmarshal(b []byte) error
- type StreamResponse
- func (*StreamResponse) Descriptor() ([]byte, []int)
- func (m *StreamResponse) GetStats() []*Snapshot
- func (*StreamResponse) ProtoMessage()
- func (m *StreamResponse) Reset()
- func (m *StreamResponse) String() string
- func (m *StreamResponse) XXX_DiscardUnknown()
- func (m *StreamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamResponse) XXX_Merge(src proto.Message)
- func (m *StreamResponse) XXX_Size() int
- func (m *StreamResponse) XXX_Unmarshal(b []byte) error
- type WriteRequest
- func (*WriteRequest) Descriptor() ([]byte, []int)
- func (m *WriteRequest) GetService() *Service
- func (m *WriteRequest) GetStats() *Snapshot
- func (*WriteRequest) ProtoMessage()
- func (m *WriteRequest) Reset()
- func (m *WriteRequest) String() string
- func (m *WriteRequest) XXX_DiscardUnknown()
- func (m *WriteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WriteRequest) XXX_Merge(src proto.Message)
- func (m *WriteRequest) XXX_Size() int
- func (m *WriteRequest) XXX_Unmarshal(b []byte) error
- type WriteResponse
- func (*WriteResponse) Descriptor() ([]byte, []int)
- func (*WriteResponse) ProtoMessage()
- func (m *WriteResponse) Reset()
- func (m *WriteResponse) String() string
- func (m *WriteResponse) XXX_DiscardUnknown()
- func (m *WriteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WriteResponse) XXX_Merge(src proto.Message)
- func (m *WriteResponse) XXX_Size() int
- func (m *WriteResponse) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterStatsHandler ¶
func RegisterStatsHandler(s server.Server, hdlr StatsHandler, opts ...server.HandlerOption) error
Types ¶
type Node ¶
type Node struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Node describes a single instance of a service.
func (*Node) Descriptor ¶
func (*Node) GetAddress ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) XXX_DiscardUnknown ¶
func (m *Node) XXX_DiscardUnknown()
func (*Node) XXX_Unmarshal ¶
type ReadRequest ¶
type ReadRequest struct { // If set, only return services matching the filter Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ReadRequest) Descriptor ¶
func (*ReadRequest) Descriptor() ([]byte, []int)
func (*ReadRequest) GetService ¶
func (m *ReadRequest) GetService() *Service
func (*ReadRequest) ProtoMessage ¶
func (*ReadRequest) ProtoMessage()
func (*ReadRequest) Reset ¶
func (m *ReadRequest) Reset()
func (*ReadRequest) String ¶
func (m *ReadRequest) String() string
func (*ReadRequest) XXX_DiscardUnknown ¶
func (m *ReadRequest) XXX_DiscardUnknown()
func (*ReadRequest) XXX_Marshal ¶
func (m *ReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReadRequest) XXX_Merge ¶
func (m *ReadRequest) XXX_Merge(src proto.Message)
func (*ReadRequest) XXX_Size ¶
func (m *ReadRequest) XXX_Size() int
func (*ReadRequest) XXX_Unmarshal ¶
func (m *ReadRequest) XXX_Unmarshal(b []byte) error
type ReadResponse ¶
type ReadResponse struct { Stats []*Snapshot `protobuf:"bytes,1,rep,name=stats,proto3" json:"stats,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ReadResponse) Descriptor ¶
func (*ReadResponse) Descriptor() ([]byte, []int)
func (*ReadResponse) GetStats ¶
func (m *ReadResponse) GetStats() []*Snapshot
func (*ReadResponse) ProtoMessage ¶
func (*ReadResponse) ProtoMessage()
func (*ReadResponse) Reset ¶
func (m *ReadResponse) Reset()
func (*ReadResponse) String ¶
func (m *ReadResponse) String() string
func (*ReadResponse) XXX_DiscardUnknown ¶
func (m *ReadResponse) XXX_DiscardUnknown()
func (*ReadResponse) XXX_Marshal ¶
func (m *ReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReadResponse) XXX_Merge ¶
func (m *ReadResponse) XXX_Merge(src proto.Message)
func (*ReadResponse) XXX_Size ¶
func (m *ReadResponse) XXX_Size() int
func (*ReadResponse) XXX_Unmarshal ¶
func (m *ReadResponse) XXX_Unmarshal(b []byte) error
type Service ¶
type Service struct { // Service name, e.g. go.micro.service.greeter Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` Node *Node `protobuf:"bytes,3,opt,name=node,proto3" json:"node,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Service describes a service running in the micro network.
func (*Service) Descriptor ¶
func (*Service) GetVersion ¶
func (*Service) ProtoMessage ¶
func (*Service) ProtoMessage()
func (*Service) XXX_DiscardUnknown ¶
func (m *Service) XXX_DiscardUnknown()
func (*Service) XXX_Marshal ¶
func (*Service) XXX_Unmarshal ¶
type Snapshot ¶
type Snapshot struct { Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` // Unix timestamp, e.g. 1575561487 Started int64 `protobuf:"varint,2,opt,name=started,proto3" json:"started,omitempty"` // Uptime in seconds Uptime uint64 `protobuf:"varint,3,opt,name=uptime,proto3" json:"uptime,omitempty"` // Heap allocated in bytes (TODO: change to resident set size) Memory uint64 `protobuf:"varint,4,opt,name=memory,proto3" json:"memory,omitempty"` // Number of Goroutines Threads uint64 `protobuf:"varint,5,opt,name=threads,proto3" json:"threads,omitempty"` // GC Pause total in ns Gc uint64 `protobuf:"varint,6,opt,name=gc,proto3" json:"gc,omitempty"` // Total number of request Requests uint64 `protobuf:"varint,7,opt,name=requests,proto3" json:"requests,omitempty"` // Total number of errors Errors uint64 `protobuf:"varint,8,opt,name=errors,proto3" json:"errors,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Snapshot is a snapshot of Debug.Stats from a particular service when called.
func (*Snapshot) Descriptor ¶
func (*Snapshot) GetRequests ¶
func (*Snapshot) GetService ¶
func (*Snapshot) GetStarted ¶
func (*Snapshot) GetThreads ¶
func (*Snapshot) ProtoMessage ¶
func (*Snapshot) ProtoMessage()
func (*Snapshot) XXX_DiscardUnknown ¶
func (m *Snapshot) XXX_DiscardUnknown()
func (*Snapshot) XXX_Marshal ¶
func (*Snapshot) XXX_Unmarshal ¶
type StatsHandler ¶
type StatsHandler interface { Read(context.Context, *ReadRequest, *ReadResponse) error Write(context.Context, *WriteRequest, *WriteResponse) error Stream(context.Context, *StreamRequest, Stats_StreamStream) error }
type StatsService ¶
type StatsService interface { Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error) Write(ctx context.Context, in *WriteRequest, opts ...client.CallOption) (*WriteResponse, error) Stream(ctx context.Context, in *StreamRequest, opts ...client.CallOption) (Stats_StreamService, error) }
func NewStatsService ¶
func NewStatsService(name string, c client.Client) StatsService
type Stats_StreamService ¶
type Stats_StreamService interface { SendMsg(interface{}) error RecvMsg(interface{}) error Close() error Recv() (*StreamResponse, error) }
type Stats_StreamStream ¶
type Stats_StreamStream interface { SendMsg(interface{}) error RecvMsg(interface{}) error Close() error Send(*StreamResponse) error }
type StreamRequest ¶
type StreamRequest struct { // If set, only return services matching the filter Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` // If set, only return services matching the namespace Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StreamRequest) Descriptor ¶
func (*StreamRequest) Descriptor() ([]byte, []int)
func (*StreamRequest) GetNamespace ¶
func (m *StreamRequest) GetNamespace() string
func (*StreamRequest) GetService ¶
func (m *StreamRequest) GetService() *Service
func (*StreamRequest) ProtoMessage ¶
func (*StreamRequest) ProtoMessage()
func (*StreamRequest) Reset ¶
func (m *StreamRequest) Reset()
func (*StreamRequest) String ¶
func (m *StreamRequest) String() string
func (*StreamRequest) XXX_DiscardUnknown ¶
func (m *StreamRequest) XXX_DiscardUnknown()
func (*StreamRequest) XXX_Marshal ¶
func (m *StreamRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StreamRequest) XXX_Merge ¶
func (m *StreamRequest) XXX_Merge(src proto.Message)
func (*StreamRequest) XXX_Size ¶
func (m *StreamRequest) XXX_Size() int
func (*StreamRequest) XXX_Unmarshal ¶
func (m *StreamRequest) XXX_Unmarshal(b []byte) error
type StreamResponse ¶
type StreamResponse struct { Stats []*Snapshot `protobuf:"bytes,1,rep,name=stats,proto3" json:"stats,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StreamResponse) Descriptor ¶
func (*StreamResponse) Descriptor() ([]byte, []int)
func (*StreamResponse) GetStats ¶
func (m *StreamResponse) GetStats() []*Snapshot
func (*StreamResponse) ProtoMessage ¶
func (*StreamResponse) ProtoMessage()
func (*StreamResponse) Reset ¶
func (m *StreamResponse) Reset()
func (*StreamResponse) String ¶
func (m *StreamResponse) String() string
func (*StreamResponse) XXX_DiscardUnknown ¶
func (m *StreamResponse) XXX_DiscardUnknown()
func (*StreamResponse) XXX_Marshal ¶
func (m *StreamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StreamResponse) XXX_Merge ¶
func (m *StreamResponse) XXX_Merge(src proto.Message)
func (*StreamResponse) XXX_Size ¶
func (m *StreamResponse) XXX_Size() int
func (*StreamResponse) XXX_Unmarshal ¶
func (m *StreamResponse) XXX_Unmarshal(b []byte) error
type WriteRequest ¶
type WriteRequest struct { // If set, only return services matching the filter Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` // snapshot to write Stats *Snapshot `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WriteRequest) Descriptor ¶
func (*WriteRequest) Descriptor() ([]byte, []int)
func (*WriteRequest) GetService ¶
func (m *WriteRequest) GetService() *Service
func (*WriteRequest) GetStats ¶
func (m *WriteRequest) GetStats() *Snapshot
func (*WriteRequest) ProtoMessage ¶
func (*WriteRequest) ProtoMessage()
func (*WriteRequest) Reset ¶
func (m *WriteRequest) Reset()
func (*WriteRequest) String ¶
func (m *WriteRequest) String() string
func (*WriteRequest) XXX_DiscardUnknown ¶
func (m *WriteRequest) XXX_DiscardUnknown()
func (*WriteRequest) XXX_Marshal ¶
func (m *WriteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WriteRequest) XXX_Merge ¶
func (m *WriteRequest) XXX_Merge(src proto.Message)
func (*WriteRequest) XXX_Size ¶
func (m *WriteRequest) XXX_Size() int
func (*WriteRequest) XXX_Unmarshal ¶
func (m *WriteRequest) XXX_Unmarshal(b []byte) error
type WriteResponse ¶
type WriteResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WriteResponse) Descriptor ¶
func (*WriteResponse) Descriptor() ([]byte, []int)
func (*WriteResponse) ProtoMessage ¶
func (*WriteResponse) ProtoMessage()
func (*WriteResponse) Reset ¶
func (m *WriteResponse) Reset()
func (*WriteResponse) String ¶
func (m *WriteResponse) String() string
func (*WriteResponse) XXX_DiscardUnknown ¶
func (m *WriteResponse) XXX_DiscardUnknown()
func (*WriteResponse) XXX_Marshal ¶
func (m *WriteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WriteResponse) XXX_Merge ¶
func (m *WriteResponse) XXX_Merge(src proto.Message)
func (*WriteResponse) XXX_Size ¶
func (m *WriteResponse) XXX_Size() int
func (*WriteResponse) XXX_Unmarshal ¶
func (m *WriteResponse) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.