debug

package
v3.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: Apache-2.0 Imports: 14 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_proto_debug_debug_proto protoreflect.FileDescriptor

Functions

func NewDebugEndpoints

func NewDebugEndpoints() []*api.Endpoint

func RegisterDebugHandler

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

func RegisterDebugServer

func RegisterDebugServer(s *grpc.Server, srv DebugServer)

Types

type DebugClient

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

DebugClient is the client API for Debug service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewDebugClient

func NewDebugClient(cc grpc.ClientConnInterface) DebugClient

type DebugServer

DebugServer is the server API for Debug service.

type DebugService

type DebugService interface {
	Log(ctx context.Context, in *LogRequest, opts ...client.CallOption) (*LogResponse, 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

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

type HealthRequest

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

func (*HealthRequest) Descriptor deprecated

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

Deprecated: Use HealthRequest.ProtoReflect.Descriptor instead.

func (*HealthRequest) ProtoMessage

func (*HealthRequest) ProtoMessage()

func (*HealthRequest) ProtoReflect added in v3.8.3

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 added in v3.8.3

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 {

	// count of records to request
	Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// relative time in seconds
	// before the current time
	// from which to show logs
	Since int64 `protobuf:"varint,2,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) GetSince

func (x *LogRequest) GetSince() int64

func (*LogRequest) ProtoMessage

func (*LogRequest) ProtoMessage()

func (*LogRequest) ProtoReflect added in v3.8.3

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

func (*LogRequest) Reset

func (x *LogRequest) Reset()

func (*LogRequest) String

func (x *LogRequest) String() string

type LogResponse

type LogResponse struct {
	Records []*Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	// contains filtered or unexported fields
}

LogResponse returns a list of logs

func (*LogResponse) Descriptor deprecated

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

Deprecated: Use LogResponse.ProtoReflect.Descriptor instead.

func (*LogResponse) GetRecords

func (x *LogResponse) GetRecords() []*Record

func (*LogResponse) ProtoMessage

func (*LogResponse) ProtoMessage()

func (*LogResponse) ProtoReflect added in v3.8.3

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

func (*LogResponse) Reset

func (x *LogResponse) Reset()

func (*LogResponse) String

func (x *LogResponse) 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 added in v3.8.3

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=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 added in v3.8.3

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 added in v3.8.3

func (SpanType) Descriptor() protoreflect.EnumDescriptor

func (SpanType) Enum added in v3.8.3

func (x SpanType) Enum() *SpanType

func (SpanType) EnumDescriptor deprecated

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

Deprecated: Use SpanType.Descriptor instead.

func (SpanType) Number added in v3.8.3

func (x SpanType) Number() protoreflect.EnumNumber

func (SpanType) String

func (x SpanType) String() string

func (SpanType) Type added in v3.8.3

type StatsRequest

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

func (*StatsRequest) Descriptor deprecated

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

Deprecated: Use StatsRequest.ProtoReflect.Descriptor instead.

func (*StatsRequest) ProtoMessage

func (*StatsRequest) ProtoMessage()

func (*StatsRequest) ProtoReflect added in v3.8.3

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 added in v3.8.3

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 added in v3.8.3

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 added in v3.8.3

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

func (*TraceResponse) Reset

func (x *TraceResponse) Reset()

func (*TraceResponse) String

func (x *TraceResponse) String() string

type UnimplementedDebugServer added in v3.8.3

type UnimplementedDebugServer struct {
}

UnimplementedDebugServer can be embedded to have forward compatible implementations.

func (*UnimplementedDebugServer) Health added in v3.8.3

func (*UnimplementedDebugServer) Log added in v3.8.3

func (*UnimplementedDebugServer) Stats added in v3.8.3

func (*UnimplementedDebugServer) Trace added in v3.8.3

Jump to

Keyboard shortcuts

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