proto

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_inspector_proto protoreflect.FileDescriptor
View Source
var Inspector_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.inspector",
	HandlerType: (*InspectorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "QueryMetric",
			Handler:    _Inspector_QueryMetric_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "WatchEvent",
			Handler:       _Inspector_WatchEvent_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "inspector.proto",
}

Inspector_ServiceDesc is the grpc.ServiceDesc for Inspector service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterInspectorServer

func RegisterInspectorServer(s grpc.ServiceRegistrar, srv InspectorServer)

Types

type Event

type Event struct {
	Meta  *Meta  `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	Name  string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetMeta

func (x *Event) GetMeta() *Meta

func (*Event) GetName

func (x *Event) GetName() string

func (*Event) GetValue

func (x *Event) GetValue() string

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type EventProbe

type EventProbe interface {
	Probe
	GetEventNames() []string
	Register(receiver chan<- RawEvent) error
}

type InspectorClient

type InspectorClient interface {
	WatchEvent(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Inspector_WatchEventClient, error)
	QueryMetric(ctx context.Context, in *QueryMetricRequest, opts ...grpc.CallOption) (*QueryMetricResponse, error)
}

InspectorClient is the client API for Inspector service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewInspectorClient

func NewInspectorClient(cc grpc.ClientConnInterface) InspectorClient

type InspectorServer

type InspectorServer interface {
	WatchEvent(*WatchRequest, Inspector_WatchEventServer) error
	QueryMetric(context.Context, *QueryMetricRequest) (*QueryMetricResponse, error)
	// contains filtered or unexported methods
}

InspectorServer is the server API for Inspector service. All implementations must embed UnimplementedInspectorServer for forward compatibility

type Inspector_WatchEventClient

type Inspector_WatchEventClient interface {
	Recv() (*WatchReply, error)
	grpc.ClientStream
}

type Inspector_WatchEventServer

type Inspector_WatchEventServer interface {
	Send(*WatchReply) error
	grpc.ServerStream
}

type Meta

type Meta struct {
	Node      string `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	Pod       string `protobuf:"bytes,2,opt,name=pod,proto3" json:"pod,omitempty"`
	Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Netns     string `protobuf:"bytes,4,opt,name=netns,proto3" json:"netns,omitempty"`
	// contains filtered or unexported fields
}

func (*Meta) Descriptor deprecated

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

Deprecated: Use Meta.ProtoReflect.Descriptor instead.

func (*Meta) GetNamespace

func (x *Meta) GetNamespace() string

func (*Meta) GetNetns

func (x *Meta) GetNetns() string

func (*Meta) GetNode

func (x *Meta) GetNode() string

func (*Meta) GetPod

func (x *Meta) GetPod() string

func (*Meta) ProtoMessage

func (*Meta) ProtoMessage()

func (*Meta) ProtoReflect

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

func (*Meta) Reset

func (x *Meta) Reset()

func (*Meta) String

func (x *Meta) String() string

type Metric

type Metric struct {
	Meta  *Meta   `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	Name  string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Value float32 `protobuf:"fixed32,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Metric) Descriptor deprecated

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

Deprecated: Use Metric.ProtoReflect.Descriptor instead.

func (*Metric) GetMeta

func (x *Metric) GetMeta() *Meta

func (*Metric) GetName

func (x *Metric) GetName() string

func (*Metric) GetValue

func (x *Metric) GetValue() float32

func (*Metric) ProtoMessage

func (*Metric) ProtoMessage()

func (*Metric) ProtoReflect

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

func (*Metric) Reset

func (x *Metric) Reset()

func (*Metric) String

func (x *Metric) String() string

type MetricProbe

type MetricProbe interface {
	Probe
	GetMetricNames() []string
	Collect(ctx context.Context) (map[string]map[uint32]uint64, error)
}

type Probe

type Probe interface {
	Start(ctx context.Context)
	Close() error
	Ready() bool
	Name() string
}

type QueryMetricRequest

type QueryMetricRequest struct {
	Name   string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Filter *Meta  `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryMetricRequest) Descriptor deprecated

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

Deprecated: Use QueryMetricRequest.ProtoReflect.Descriptor instead.

func (*QueryMetricRequest) GetFilter

func (x *QueryMetricRequest) GetFilter() *Meta

func (*QueryMetricRequest) GetName

func (x *QueryMetricRequest) GetName() string

func (*QueryMetricRequest) ProtoMessage

func (*QueryMetricRequest) ProtoMessage()

func (*QueryMetricRequest) ProtoReflect

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

func (*QueryMetricRequest) Reset

func (x *QueryMetricRequest) Reset()

func (*QueryMetricRequest) String

func (x *QueryMetricRequest) String() string

type QueryMetricResponse

type QueryMetricResponse struct {
	Name    string    `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Metrics []*Metric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryMetricResponse) Descriptor deprecated

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

Deprecated: Use QueryMetricResponse.ProtoReflect.Descriptor instead.

func (*QueryMetricResponse) GetMetrics

func (x *QueryMetricResponse) GetMetrics() []*Metric

func (*QueryMetricResponse) GetName

func (x *QueryMetricResponse) GetName() string

func (*QueryMetricResponse) ProtoMessage

func (*QueryMetricResponse) ProtoMessage()

func (*QueryMetricResponse) ProtoReflect

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

func (*QueryMetricResponse) Reset

func (x *QueryMetricResponse) Reset()

func (*QueryMetricResponse) String

func (x *QueryMetricResponse) String() string

type RawEvent

type RawEvent struct {
	Netns     uint32
	EventType string
	EventBody string
}

type UnimplementedInspectorServer

type UnimplementedInspectorServer struct {
}

UnimplementedInspectorServer must be embedded to have forward compatible implementations.

func (UnimplementedInspectorServer) QueryMetric

func (UnimplementedInspectorServer) WatchEvent

type UnsafeInspectorServer

type UnsafeInspectorServer interface {
	// contains filtered or unexported methods
}

UnsafeInspectorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InspectorServer will result in compilation errors.

type WatchReply

type WatchReply struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Event *Event `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"`
	// contains filtered or unexported fields
}

func (*WatchReply) Descriptor deprecated

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

Deprecated: Use WatchReply.ProtoReflect.Descriptor instead.

func (*WatchReply) GetEvent

func (x *WatchReply) GetEvent() *Event

func (*WatchReply) GetName

func (x *WatchReply) GetName() string

func (*WatchReply) ProtoMessage

func (*WatchReply) ProtoMessage()

func (*WatchReply) ProtoReflect

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

func (*WatchReply) Reset

func (x *WatchReply) Reset()

func (*WatchReply) String

func (x *WatchReply) String() string

type WatchRequest

type WatchRequest struct {
	Name   string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Filter *Meta  `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

func (*WatchRequest) Descriptor deprecated

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

Deprecated: Use WatchRequest.ProtoReflect.Descriptor instead.

func (*WatchRequest) GetFilter

func (x *WatchRequest) GetFilter() *Meta

func (*WatchRequest) GetName

func (x *WatchRequest) GetName() string

func (*WatchRequest) ProtoMessage

func (*WatchRequest) ProtoMessage()

func (*WatchRequest) ProtoReflect

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

func (*WatchRequest) Reset

func (x *WatchRequest) Reset()

func (*WatchRequest) String

func (x *WatchRequest) String() string

Jump to

Keyboard shortcuts

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