go-micro: github.com/micro/go-micro/debug/service/proto Index | Files

package debug

import "github.com/micro/go-micro/debug/service/proto"

Index

Package Files

debug.pb.go debug.pb.micro.go

Variables

var SpanType_name = map[int32]string{
    0:  "INBOUND",
    1:  "OUTBOUND",
}
var SpanType_value = map[string]int32{
    "INBOUND":  0,
    "OUTBOUND": 1,
}

func RegisterDebugHandler Uses

func RegisterDebugHandler(s server.Server, hdlr DebugHandler, opts ...server.HandlerOption) error

type DebugHandler Uses

type DebugHandler interface {
    Log(context.Context, *LogRequest, Debug_LogStream) error
    Health(context.Context, *HealthRequest, *HealthResponse) error
    Stats(context.Context, *StatsRequest, *StatsResponse) error
    Trace(context.Context, *TraceRequest, *TraceResponse) error
}

type DebugService Uses

type DebugService interface {
    Log(ctx context.Context, in *LogRequest, opts ...client.CallOption) (Debug_LogService, error)
    Health(ctx context.Context, in *HealthRequest, opts ...client.CallOption) (*HealthResponse, error)
    Stats(ctx context.Context, in *StatsRequest, opts ...client.CallOption) (*StatsResponse, error)
    Trace(ctx context.Context, in *TraceRequest, opts ...client.CallOption) (*TraceResponse, error)
}

func NewDebugService Uses

func NewDebugService(name string, c client.Client) DebugService

type Debug_LogService Uses

type Debug_LogService interface {
    Context() context.Context
    SendMsg(interface{}) error
    RecvMsg(interface{}) error
    Close() error
    Recv() (*Record, error)
}

type Debug_LogStream Uses

type Debug_LogStream interface {
    Context() context.Context
    SendMsg(interface{}) error
    RecvMsg(interface{}) error
    Close() error
    Send(*Record) error
}

type HealthRequest Uses

type HealthRequest struct {
    // optional service name
    Service              string   `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*HealthRequest) Descriptor Uses

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

func (*HealthRequest) GetService Uses

func (m *HealthRequest) GetService() string

func (*HealthRequest) ProtoMessage Uses

func (*HealthRequest) ProtoMessage()

func (*HealthRequest) Reset Uses

func (m *HealthRequest) Reset()

func (*HealthRequest) String Uses

func (m *HealthRequest) String() string

func (*HealthRequest) XXX_DiscardUnknown Uses

func (m *HealthRequest) XXX_DiscardUnknown()

func (*HealthRequest) XXX_Marshal Uses

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

func (*HealthRequest) XXX_Merge Uses

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

func (*HealthRequest) XXX_Size Uses

func (m *HealthRequest) XXX_Size() int

func (*HealthRequest) XXX_Unmarshal Uses

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

type HealthResponse Uses

type HealthResponse struct {
    // default: ok
    Status               string   `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*HealthResponse) Descriptor Uses

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

func (*HealthResponse) GetStatus Uses

func (m *HealthResponse) GetStatus() string

func (*HealthResponse) ProtoMessage Uses

func (*HealthResponse) ProtoMessage()

func (*HealthResponse) Reset Uses

func (m *HealthResponse) Reset()

func (*HealthResponse) String Uses

func (m *HealthResponse) String() string

func (*HealthResponse) XXX_DiscardUnknown Uses

func (m *HealthResponse) XXX_DiscardUnknown()

func (*HealthResponse) XXX_Marshal Uses

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

func (*HealthResponse) XXX_Merge Uses

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

func (*HealthResponse) XXX_Size Uses

func (m *HealthResponse) XXX_Size() int

func (*HealthResponse) XXX_Unmarshal Uses

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

type LogRequest Uses

type LogRequest struct {
    // service to request logs for
    Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
    // stream records continuously
    Stream bool `protobuf:"varint,2,opt,name=stream,proto3" json:"stream,omitempty"`
    // count of records to request
    Count int64 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
    // relative time in seconds
    // before the current time
    // from which to show logs
    Since                int64    `protobuf:"varint,4,opt,name=since,proto3" json:"since,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

LogRequest requests service logs

func (*LogRequest) Descriptor Uses

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

func (*LogRequest) GetCount Uses

func (m *LogRequest) GetCount() int64

func (*LogRequest) GetService Uses

func (m *LogRequest) GetService() string

func (*LogRequest) GetSince Uses

func (m *LogRequest) GetSince() int64

func (*LogRequest) GetStream Uses

func (m *LogRequest) GetStream() bool

func (*LogRequest) ProtoMessage Uses

func (*LogRequest) ProtoMessage()

func (*LogRequest) Reset Uses

func (m *LogRequest) Reset()

func (*LogRequest) String Uses

func (m *LogRequest) String() string

func (*LogRequest) XXX_DiscardUnknown Uses

func (m *LogRequest) XXX_DiscardUnknown()

func (*LogRequest) XXX_Marshal Uses

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

func (*LogRequest) XXX_Merge Uses

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

func (*LogRequest) XXX_Size Uses

func (m *LogRequest) XXX_Size() int

func (*LogRequest) XXX_Unmarshal Uses

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

type Record Uses

type Record struct {
    // timestamp of log record
    Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
    // record metadata
    Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // message
    Message              string   `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

Record is service log record

func (*Record) Descriptor Uses

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

func (*Record) GetMessage Uses

func (m *Record) GetMessage() string

func (*Record) GetMetadata Uses

func (m *Record) GetMetadata() map[string]string

func (*Record) GetTimestamp Uses

func (m *Record) GetTimestamp() int64

func (*Record) ProtoMessage Uses

func (*Record) ProtoMessage()

func (*Record) Reset Uses

func (m *Record) Reset()

func (*Record) String Uses

func (m *Record) String() string

func (*Record) XXX_DiscardUnknown Uses

func (m *Record) XXX_DiscardUnknown()

func (*Record) XXX_Marshal Uses

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

func (*Record) XXX_Merge Uses

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

func (*Record) XXX_Size Uses

func (m *Record) XXX_Size() int

func (*Record) XXX_Unmarshal Uses

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

type Span Uses

type Span struct {
    // the trace id
    Trace string `protobuf:"bytes,1,opt,name=trace,proto3" json:"trace,omitempty"`
    // id of the span
    Id  string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
    // parent span
    Parent string `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"`
    // name of the resource
    Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
    // time of start in nanoseconds
    Started uint64 `protobuf:"varint,5,opt,name=started,proto3" json:"started,omitempty"`
    // duration of the execution in nanoseconds
    Duration uint64 `protobuf:"varint,6,opt,name=duration,proto3" json:"duration,omitempty"`
    // associated metadata
    Metadata             map[string]string `protobuf:"bytes,7,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    Type                 SpanType          `protobuf:"varint,8,opt,name=type,proto3,enum=SpanType" json:"type,omitempty"`
    XXX_NoUnkeyedLiteral struct{}          `json:"-"`
    XXX_unrecognized     []byte            `json:"-"`
    XXX_sizecache        int32             `json:"-"`
}

func (*Span) Descriptor Uses

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

func (*Span) GetDuration Uses

func (m *Span) GetDuration() uint64

func (*Span) GetId Uses

func (m *Span) GetId() string

func (*Span) GetMetadata Uses

func (m *Span) GetMetadata() map[string]string

func (*Span) GetName Uses

func (m *Span) GetName() string

func (*Span) GetParent Uses

func (m *Span) GetParent() string

func (*Span) GetStarted Uses

func (m *Span) GetStarted() uint64

func (*Span) GetTrace Uses

func (m *Span) GetTrace() string

func (*Span) GetType Uses

func (m *Span) GetType() SpanType

func (*Span) ProtoMessage Uses

func (*Span) ProtoMessage()

func (*Span) Reset Uses

func (m *Span) Reset()

func (*Span) String Uses

func (m *Span) String() string

func (*Span) XXX_DiscardUnknown Uses

func (m *Span) XXX_DiscardUnknown()

func (*Span) XXX_Marshal Uses

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

func (*Span) XXX_Merge Uses

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

func (*Span) XXX_Size Uses

func (m *Span) XXX_Size() int

func (*Span) XXX_Unmarshal Uses

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

type SpanType Uses

type SpanType int32
const (
    SpanType_INBOUND  SpanType = 0
    SpanType_OUTBOUND SpanType = 1
)

func (SpanType) EnumDescriptor Uses

func (SpanType) EnumDescriptor() ([]byte, []int)

func (SpanType) String Uses

func (x SpanType) String() string

type StatsRequest Uses

type StatsRequest struct {
    // optional service name
    Service              string   `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*StatsRequest) Descriptor Uses

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

func (*StatsRequest) GetService Uses

func (m *StatsRequest) GetService() string

func (*StatsRequest) ProtoMessage Uses

func (*StatsRequest) ProtoMessage()

func (*StatsRequest) Reset Uses

func (m *StatsRequest) Reset()

func (*StatsRequest) String Uses

func (m *StatsRequest) String() string

func (*StatsRequest) XXX_DiscardUnknown Uses

func (m *StatsRequest) XXX_DiscardUnknown()

func (*StatsRequest) XXX_Marshal Uses

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

func (*StatsRequest) XXX_Merge Uses

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

func (*StatsRequest) XXX_Size Uses

func (m *StatsRequest) XXX_Size() int

func (*StatsRequest) XXX_Unmarshal Uses

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

type StatsResponse Uses

type StatsResponse struct {
    // timestamp of recording
    Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
    // unix timestamp
    Started uint64 `protobuf:"varint,2,opt,name=started,proto3" json:"started,omitempty"`
    // in seconds
    Uptime uint64 `protobuf:"varint,3,opt,name=uptime,proto3" json:"uptime,omitempty"`
    // in bytes
    Memory uint64 `protobuf:"varint,4,opt,name=memory,proto3" json:"memory,omitempty"`
    // num threads
    Threads uint64 `protobuf:"varint,5,opt,name=threads,proto3" json:"threads,omitempty"`
    // total gc in nanoseconds
    Gc  uint64 `protobuf:"varint,6,opt,name=gc,proto3" json:"gc,omitempty"`
    // total number of requests
    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:"-"`
}

func (*StatsResponse) Descriptor Uses

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

func (*StatsResponse) GetErrors Uses

func (m *StatsResponse) GetErrors() uint64

func (*StatsResponse) GetGc Uses

func (m *StatsResponse) GetGc() uint64

func (*StatsResponse) GetMemory Uses

func (m *StatsResponse) GetMemory() uint64

func (*StatsResponse) GetRequests Uses

func (m *StatsResponse) GetRequests() uint64

func (*StatsResponse) GetStarted Uses

func (m *StatsResponse) GetStarted() uint64

func (*StatsResponse) GetThreads Uses

func (m *StatsResponse) GetThreads() uint64

func (*StatsResponse) GetTimestamp Uses

func (m *StatsResponse) GetTimestamp() uint64

func (*StatsResponse) GetUptime Uses

func (m *StatsResponse) GetUptime() uint64

func (*StatsResponse) ProtoMessage Uses

func (*StatsResponse) ProtoMessage()

func (*StatsResponse) Reset Uses

func (m *StatsResponse) Reset()

func (*StatsResponse) String Uses

func (m *StatsResponse) String() string

func (*StatsResponse) XXX_DiscardUnknown Uses

func (m *StatsResponse) XXX_DiscardUnknown()

func (*StatsResponse) XXX_Marshal Uses

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

func (*StatsResponse) XXX_Merge Uses

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

func (*StatsResponse) XXX_Size Uses

func (m *StatsResponse) XXX_Size() int

func (*StatsResponse) XXX_Unmarshal Uses

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

type TraceRequest Uses

type TraceRequest struct {
    // trace id to retrieve
    Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*TraceRequest) Descriptor Uses

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

func (*TraceRequest) GetId Uses

func (m *TraceRequest) GetId() string

func (*TraceRequest) ProtoMessage Uses

func (*TraceRequest) ProtoMessage()

func (*TraceRequest) Reset Uses

func (m *TraceRequest) Reset()

func (*TraceRequest) String Uses

func (m *TraceRequest) String() string

func (*TraceRequest) XXX_DiscardUnknown Uses

func (m *TraceRequest) XXX_DiscardUnknown()

func (*TraceRequest) XXX_Marshal Uses

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

func (*TraceRequest) XXX_Merge Uses

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

func (*TraceRequest) XXX_Size Uses

func (m *TraceRequest) XXX_Size() int

func (*TraceRequest) XXX_Unmarshal Uses

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

type TraceResponse Uses

type TraceResponse struct {
    Spans                []*Span  `protobuf:"bytes,1,rep,name=spans,proto3" json:"spans,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*TraceResponse) Descriptor Uses

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

func (*TraceResponse) GetSpans Uses

func (m *TraceResponse) GetSpans() []*Span

func (*TraceResponse) ProtoMessage Uses

func (*TraceResponse) ProtoMessage()

func (*TraceResponse) Reset Uses

func (m *TraceResponse) Reset()

func (*TraceResponse) String Uses

func (m *TraceResponse) String() string

func (*TraceResponse) XXX_DiscardUnknown Uses

func (m *TraceResponse) XXX_DiscardUnknown()

func (*TraceResponse) XXX_Marshal Uses

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

func (*TraceResponse) XXX_Merge Uses

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

func (*TraceResponse) XXX_Size Uses

func (m *TraceResponse) XXX_Size() int

func (*TraceResponse) XXX_Unmarshal Uses

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

Package debug imports 6 packages (graph) and is imported by 17 packages. Updated 2020-02-13. Refresh now. Tools for package owners.