go_micro_debug_stats

package
v2.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2021 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*Node) GetAddress

func (m *Node) GetAddress() string

func (*Node) GetId

func (m *Node) GetId() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) String

func (m *Node) String() string

func (*Node) XXX_DiscardUnknown

func (m *Node) XXX_DiscardUnknown()

func (*Node) XXX_Marshal

func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Node) XXX_Merge

func (m *Node) XXX_Merge(src proto.Message)

func (*Node) XXX_Size

func (m *Node) XXX_Size() int

func (*Node) XXX_Unmarshal

func (m *Node) XXX_Unmarshal(b []byte) error

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"`
	// If false, only the current snapshots will be returned.
	// If true, all historical snapshots in memory will be returned.
	Past                 bool     `protobuf:"varint,2,opt,name=past,proto3" json:"past,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReadRequest) Descriptor

func (*ReadRequest) Descriptor() ([]byte, []int)

func (*ReadRequest) GetPast

func (m *ReadRequest) GetPast() bool

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) Descriptor() ([]byte, []int)

func (*Service) GetName

func (m *Service) GetName() string

func (*Service) GetNode

func (m *Service) GetNode() *Node

func (*Service) GetVersion

func (m *Service) GetVersion() string

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) Reset

func (m *Service) Reset()

func (*Service) String

func (m *Service) String() string

func (*Service) XXX_DiscardUnknown

func (m *Service) XXX_DiscardUnknown()

func (*Service) XXX_Marshal

func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Service) XXX_Merge

func (m *Service) XXX_Merge(src proto.Message)

func (*Service) XXX_Size

func (m *Service) XXX_Size() int

func (*Service) XXX_Unmarshal

func (m *Service) XXX_Unmarshal(b []byte) error

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"`
	// Timestamp at the time of the taking of the snapshot, seconds since unix epoch
	Timestamp            uint64   `protobuf:"varint,9,opt,name=timestamp,proto3" json:"timestamp,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) Descriptor() ([]byte, []int)

func (*Snapshot) GetErrors

func (m *Snapshot) GetErrors() uint64

func (*Snapshot) GetGc

func (m *Snapshot) GetGc() uint64

func (*Snapshot) GetMemory

func (m *Snapshot) GetMemory() uint64

func (*Snapshot) GetRequests

func (m *Snapshot) GetRequests() uint64

func (*Snapshot) GetService

func (m *Snapshot) GetService() *Service

func (*Snapshot) GetStarted

func (m *Snapshot) GetStarted() int64

func (*Snapshot) GetThreads

func (m *Snapshot) GetThreads() uint64

func (*Snapshot) GetTimestamp

func (m *Snapshot) GetTimestamp() uint64

func (*Snapshot) GetUptime

func (m *Snapshot) GetUptime() uint64

func (*Snapshot) ProtoMessage

func (*Snapshot) ProtoMessage()

func (*Snapshot) Reset

func (m *Snapshot) Reset()

func (*Snapshot) String

func (m *Snapshot) String() string

func (*Snapshot) XXX_DiscardUnknown

func (m *Snapshot) XXX_DiscardUnknown()

func (*Snapshot) XXX_Marshal

func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Snapshot) XXX_Merge

func (m *Snapshot) XXX_Merge(src proto.Message)

func (*Snapshot) XXX_Size

func (m *Snapshot) XXX_Size() int

func (*Snapshot) XXX_Unmarshal

func (m *Snapshot) XXX_Unmarshal(b []byte) 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL