proto

package
v0.0.0-...-23bf2d9 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Enum value maps for SpanType.

View Source
var File_debug_service_proto_debug_proto protoreflect.FileDescriptor

Functions

func NewDebugEndpoints

func NewDebugEndpoints() []*api.Endpoint

NewDebugEndpoints API Endpoints for Debug service

func RegisterDebugHandler

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

Types

type CacheRequest

type CacheRequest struct {
	// contains filtered or unexported fields
}

func (*CacheRequest) Descriptor deprecated

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

Deprecated: Use CacheRequest.ProtoReflect.Descriptor instead.

func (*CacheRequest) ProtoMessage

func (*CacheRequest) ProtoMessage()

func (*CacheRequest) ProtoReflect

func (x *CacheRequest) ProtoReflect() protoreflect.Message

func (*CacheRequest) Reset

func (x *CacheRequest) Reset()

func (*CacheRequest) String

func (x *CacheRequest) String() string

type CacheResponse

type CacheResponse struct {
	Values map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*CacheResponse) Descriptor deprecated

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

Deprecated: Use CacheResponse.ProtoReflect.Descriptor instead.

func (*CacheResponse) GetValues

func (x *CacheResponse) GetValues() map[string]string

func (*CacheResponse) ProtoMessage

func (*CacheResponse) ProtoMessage()

func (*CacheResponse) ProtoReflect

func (x *CacheResponse) ProtoReflect() protoreflect.Message

func (*CacheResponse) Reset

func (x *CacheResponse) Reset()

func (*CacheResponse) String

func (x *CacheResponse) String() string

type DebugHandler

DebugHandler is the server API for Debug service.

type DebugService

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)
	Cache(ctx context.Context, in *CacheRequest, opts ...client.CallOption) (*CacheResponse, error)
}

DebugService is the client API for Debug service.

func NewDebugService

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

type Debug_LogService

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

type Debug_LogStream

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

type HealthRequest

type HealthRequest struct {

	// optional service name
	Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthRequest) Descriptor deprecated

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

Deprecated: Use HealthRequest.ProtoReflect.Descriptor instead.

func (*HealthRequest) GetService

func (x *HealthRequest) GetService() string

func (*HealthRequest) ProtoMessage

func (*HealthRequest) ProtoMessage()

func (*HealthRequest) ProtoReflect

func (x *HealthRequest) ProtoReflect() protoreflect.Message

func (*HealthRequest) Reset

func (x *HealthRequest) Reset()

func (*HealthRequest) String

func (x *HealthRequest) String() string

type HealthResponse

type HealthResponse struct {

	// default: ok
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthResponse) Descriptor deprecated

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

Deprecated: Use HealthResponse.ProtoReflect.Descriptor instead.

func (*HealthResponse) GetStatus

func (x *HealthResponse) GetStatus() string

func (*HealthResponse) ProtoMessage

func (*HealthResponse) ProtoMessage()

func (*HealthResponse) ProtoReflect

func (x *HealthResponse) ProtoReflect() protoreflect.Message

func (*HealthResponse) Reset

func (x *HealthResponse) Reset()

func (*HealthResponse) String

func (x *HealthResponse) String() string

type LogRequest

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"`
	// contains filtered or unexported fields
}

LogRequest requests service logs

func (*LogRequest) Descriptor deprecated

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

Deprecated: Use LogRequest.ProtoReflect.Descriptor instead.

func (*LogRequest) GetCount

func (x *LogRequest) GetCount() int64

func (*LogRequest) GetService

func (x *LogRequest) GetService() string

func (*LogRequest) GetSince

func (x *LogRequest) GetSince() int64

func (*LogRequest) GetStream

func (x *LogRequest) GetStream() bool

func (*LogRequest) ProtoMessage

func (*LogRequest) ProtoMessage()

func (*LogRequest) ProtoReflect

func (x *LogRequest) ProtoReflect() protoreflect.Message

func (*LogRequest) Reset

func (x *LogRequest) Reset()

func (*LogRequest) String

func (x *LogRequest) String() string

type Record

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 `` /* 157-byte string literal not displayed */
	// message
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

Record is service log record

func (*Record) Descriptor deprecated

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

Deprecated: Use Record.ProtoReflect.Descriptor instead.

func (*Record) GetMessage

func (x *Record) GetMessage() string

func (*Record) GetMetadata

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

func (*Record) GetTimestamp

func (x *Record) GetTimestamp() int64

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) ProtoReflect

func (x *Record) ProtoReflect() protoreflect.Message

func (*Record) Reset

func (x *Record) Reset()

func (*Record) String

func (x *Record) String() string

type Span

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 `` /* 157-byte string literal not displayed */
	Type     SpanType          `protobuf:"varint,8,opt,name=type,proto3,enum=go.micro.debug.SpanType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*Span) Descriptor deprecated

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

Deprecated: Use Span.ProtoReflect.Descriptor instead.

func (*Span) GetDuration

func (x *Span) GetDuration() uint64

func (*Span) GetId

func (x *Span) GetId() string

func (*Span) GetMetadata

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

func (*Span) GetName

func (x *Span) GetName() string

func (*Span) GetParent

func (x *Span) GetParent() string

func (*Span) GetStarted

func (x *Span) GetStarted() uint64

func (*Span) GetTrace

func (x *Span) GetTrace() string

func (*Span) GetType

func (x *Span) GetType() SpanType

func (*Span) ProtoMessage

func (*Span) ProtoMessage()

func (*Span) ProtoReflect

func (x *Span) ProtoReflect() protoreflect.Message

func (*Span) Reset

func (x *Span) Reset()

func (*Span) String

func (x *Span) String() string

type SpanType

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

func (SpanType) Descriptor

func (SpanType) Descriptor() protoreflect.EnumDescriptor

func (SpanType) Enum

func (x SpanType) Enum() *SpanType

func (SpanType) EnumDescriptor deprecated

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

Deprecated: Use SpanType.Descriptor instead.

func (SpanType) Number

func (x SpanType) Number() protoreflect.EnumNumber

func (SpanType) String

func (x SpanType) String() string

func (SpanType) Type

type StatsRequest

type StatsRequest struct {

	// optional service name
	Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	// contains filtered or unexported fields
}

func (*StatsRequest) Descriptor deprecated

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

Deprecated: Use StatsRequest.ProtoReflect.Descriptor instead.

func (*StatsRequest) GetService

func (x *StatsRequest) GetService() string

func (*StatsRequest) ProtoMessage

func (*StatsRequest) ProtoMessage()

func (*StatsRequest) ProtoReflect

func (x *StatsRequest) ProtoReflect() protoreflect.Message

func (*StatsRequest) Reset

func (x *StatsRequest) Reset()

func (*StatsRequest) String

func (x *StatsRequest) String() string

type StatsResponse

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"`
	// contains filtered or unexported fields
}

func (*StatsResponse) Descriptor deprecated

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

Deprecated: Use StatsResponse.ProtoReflect.Descriptor instead.

func (*StatsResponse) GetErrors

func (x *StatsResponse) GetErrors() uint64

func (*StatsResponse) GetGc

func (x *StatsResponse) GetGc() uint64

func (*StatsResponse) GetMemory

func (x *StatsResponse) GetMemory() uint64

func (*StatsResponse) GetRequests

func (x *StatsResponse) GetRequests() uint64

func (*StatsResponse) GetStarted

func (x *StatsResponse) GetStarted() uint64

func (*StatsResponse) GetThreads

func (x *StatsResponse) GetThreads() uint64

func (*StatsResponse) GetTimestamp

func (x *StatsResponse) GetTimestamp() uint64

func (*StatsResponse) GetUptime

func (x *StatsResponse) GetUptime() uint64

func (*StatsResponse) ProtoMessage

func (*StatsResponse) ProtoMessage()

func (*StatsResponse) ProtoReflect

func (x *StatsResponse) ProtoReflect() protoreflect.Message

func (*StatsResponse) Reset

func (x *StatsResponse) Reset()

func (*StatsResponse) String

func (x *StatsResponse) String() string

type TraceRequest

type TraceRequest struct {

	// trace id to retrieve
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*TraceRequest) Descriptor deprecated

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

Deprecated: Use TraceRequest.ProtoReflect.Descriptor instead.

func (*TraceRequest) GetId

func (x *TraceRequest) GetId() string

func (*TraceRequest) ProtoMessage

func (*TraceRequest) ProtoMessage()

func (*TraceRequest) ProtoReflect

func (x *TraceRequest) ProtoReflect() protoreflect.Message

func (*TraceRequest) Reset

func (x *TraceRequest) Reset()

func (*TraceRequest) String

func (x *TraceRequest) String() string

type TraceResponse

type TraceResponse struct {
	Spans []*Span `protobuf:"bytes,1,rep,name=spans,proto3" json:"spans,omitempty"`
	// contains filtered or unexported fields
}

func (*TraceResponse) Descriptor deprecated

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

Deprecated: Use TraceResponse.ProtoReflect.Descriptor instead.

func (*TraceResponse) GetSpans

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

func (*TraceResponse) ProtoMessage

func (*TraceResponse) ProtoMessage()

func (*TraceResponse) ProtoReflect

func (x *TraceResponse) ProtoReflect() protoreflect.Message

func (*TraceResponse) Reset

func (x *TraceResponse) Reset()

func (*TraceResponse) String

func (x *TraceResponse) String() string

Jump to

Keyboard shortcuts

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