v1

package
v0.0.0-...-39c03fc Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ResponseType_name = map[int32]string{
		0: "NO_CHANGE",
		1: "UPDATE",
	}
	ResponseType_value = map[string]int32{
		"NO_CHANGE": 0,
		"UPDATE":    1,
	}
)

Enum value maps for ResponseType.

View Source
var File_poll_v1_poll_proto protoreflect.FileDescriptor
View Source
var PollConfig_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "deeppb.poll.v1.PollConfig",
	HandlerType: (*PollConfigServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "poll",
			Handler:    _PollConfig_Poll_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "poll/v1/poll.proto",
}

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

Functions

func RegisterPollConfigServer

func RegisterPollConfigServer(s grpc.ServiceRegistrar, srv PollConfigServer)

Types

type PollConfigClient

type PollConfigClient interface {
	//Call this function as often as is required to ensure config is up to date.
	Poll(ctx context.Context, in *PollRequest, opts ...grpc.CallOption) (*PollResponse, error)
}

PollConfigClient is the client API for PollConfig 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 NewPollConfigClient

func NewPollConfigClient(cc grpc.ClientConnInterface) PollConfigClient

type PollConfigServer

type PollConfigServer interface {
	//Call this function as often as is required to ensure config is up to date.
	Poll(context.Context, *PollRequest) (*PollResponse, error)
	// contains filtered or unexported methods
}

PollConfigServer is the server API for PollConfig service. All implementations must embed UnimplementedPollConfigServer for forward compatibility

type PollRequest

type PollRequest struct {
	TsNanos     uint64       `protobuf:"fixed64,1,opt,name=ts_nanos,json=tsNanos,proto3" json:"ts_nanos,omitempty"`           //The time (as epoch nanos) when the message was sent, acts as message ID.
	CurrentHash string       `protobuf:"bytes,2,opt,name=current_hash,json=currentHash,proto3" json:"current_hash,omitempty"` //This should the the hash that was last sent by the server, this is used to determine if the config has changed since the last poll. If no hash is available (e.g. first poll) then do not set this value.
	Resource    *v1.Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`                          //The attributes that represent the client making the request. These attributes are used to filter the tracepoint response to just the tracepoints that are for the requesting client.
	// contains filtered or unexported fields
}

PollRequest is sent by the client to check its current config with the server.

func (*PollRequest) Descriptor deprecated

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

Deprecated: Use PollRequest.ProtoReflect.Descriptor instead.

func (*PollRequest) GetCurrentHash

func (x *PollRequest) GetCurrentHash() string

func (*PollRequest) GetResource

func (x *PollRequest) GetResource() *v1.Resource

func (*PollRequest) GetTsNanos

func (x *PollRequest) GetTsNanos() uint64

func (*PollRequest) ProtoMessage

func (*PollRequest) ProtoMessage()

func (*PollRequest) ProtoReflect

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

func (*PollRequest) Reset

func (x *PollRequest) Reset()

func (*PollRequest) String

func (x *PollRequest) String() string

type PollResponse

type PollResponse struct {
	TsNanos      uint64                  `protobuf:"fixed64,1,opt,name=ts_nanos,json=tsNanos,proto3" json:"ts_nanos,omitempty"`           //The time (as epoch nanos) then he message was sent. This should match the 'ts_nanos' from the triggering PollRequest.
	CurrentHash  string                  `protobuf:"bytes,2,opt,name=current_hash,json=currentHash,proto3" json:"current_hash,omitempty"` //This is the hash that the server has assigned this current config for this client. This should be sent with the next PollRequest.
	Response     []*v11.TracePointConfig `protobuf:"bytes,3,rep,name=response,proto3" json:"response,omitempty"`                          //This is the list of tracepoints that are currently configured for this client.
	ResponseType ResponseType            ``                                                                                               // This indicates if the config has changed or not. If 'NO_CHANGE' then 'response' should be null or empty.
	/* 131-byte string literal not displayed */
	// contains filtered or unexported fields
}

PollResponse is the response the server will send in response to a PollRequest.

func (*PollResponse) Descriptor deprecated

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

Deprecated: Use PollResponse.ProtoReflect.Descriptor instead.

func (*PollResponse) GetCurrentHash

func (x *PollResponse) GetCurrentHash() string

func (*PollResponse) GetResponse

func (x *PollResponse) GetResponse() []*v11.TracePointConfig

func (*PollResponse) GetResponseType

func (x *PollResponse) GetResponseType() ResponseType

func (*PollResponse) GetTsNanos

func (x *PollResponse) GetTsNanos() uint64

func (*PollResponse) ProtoMessage

func (*PollResponse) ProtoMessage()

func (*PollResponse) ProtoReflect

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

func (*PollResponse) Reset

func (x *PollResponse) Reset()

func (*PollResponse) String

func (x *PollResponse) String() string

type ResponseType

type ResponseType int32

ResponseType is used to indicate if the response from the server should trigger an update of the client config. If the client sends the same 'current_hash' as that which the server has for the client, then the server will response with 'NO_CHANGE'. This allows the client to not trigger any changes to the current tracepoint configs.

const (
	ResponseType_NO_CHANGE ResponseType = 0 // This is sent when the 'current_hash' from the request is the same as the response. So the client should do nothing.
	ResponseType_UPDATE    ResponseType = 1 // This is sent when the client should process the response to update the config.
)

func (ResponseType) Descriptor

func (ResponseType) Enum

func (x ResponseType) Enum() *ResponseType

func (ResponseType) EnumDescriptor deprecated

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

Deprecated: Use ResponseType.Descriptor instead.

func (ResponseType) Number

func (ResponseType) String

func (x ResponseType) String() string

func (ResponseType) Type

type UnimplementedPollConfigServer

type UnimplementedPollConfigServer struct {
}

UnimplementedPollConfigServer must be embedded to have forward compatible implementations.

func (UnimplementedPollConfigServer) Poll

type UnsafePollConfigServer

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

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

Jump to

Keyboard shortcuts

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