rpc

package
v17.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentConfiguration_GetConfiguration_FullMethodName = "/gitlab.agent.agent_configuration.rpc.AgentConfiguration/GetConfiguration"
)

Variables

View Source
var AgentConfiguration_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gitlab.agent.agent_configuration.rpc.AgentConfiguration",
	HandlerType: (*AgentConfigurationServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetConfiguration",
			Handler:       _AgentConfiguration_GetConfiguration_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "internal/module/agent_configuration/rpc/rpc.proto",
}

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

View Source
var File_internal_module_agent_configuration_rpc_rpc_proto protoreflect.FileDescriptor

Functions

func RegisterAgentConfigurationServer

func RegisterAgentConfigurationServer(s grpc.ServiceRegistrar, srv AgentConfigurationServer)

Types

type AgentConfigurationClient

type AgentConfigurationClient interface {
	GetConfiguration(ctx context.Context, in *ConfigurationRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ConfigurationResponse], error)
}

AgentConfigurationClient is the client API for AgentConfiguration 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.

type AgentConfigurationServer

type AgentConfigurationServer interface {
	GetConfiguration(*ConfigurationRequest, grpc.ServerStreamingServer[ConfigurationResponse]) error
	// contains filtered or unexported methods
}

AgentConfigurationServer is the server API for AgentConfiguration service. All implementations must embed UnimplementedAgentConfigurationServer for forward compatibility.

type AgentConfiguration_GetConfigurationClient

type AgentConfiguration_GetConfigurationClient = grpc.ServerStreamingClient[ConfigurationResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type AgentConfiguration_GetConfigurationServer

type AgentConfiguration_GetConfigurationServer = grpc.ServerStreamingServer[ConfigurationResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ConfigurationCallback

type ConfigurationCallback func(context.Context, ConfigurationData)

type ConfigurationData

type ConfigurationData struct {
	CommitID string
	Config   *agentcfg.AgentConfiguration
}

type ConfigurationRequest

type ConfigurationRequest struct {
	CommitId string `protobuf:"bytes,1,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigurationRequest) Descriptor deprecated

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

Deprecated: Use ConfigurationRequest.ProtoReflect.Descriptor instead.

func (*ConfigurationRequest) GetCommitId

func (x *ConfigurationRequest) GetCommitId() string

func (*ConfigurationRequest) ProtoMessage

func (*ConfigurationRequest) ProtoMessage()

func (*ConfigurationRequest) ProtoReflect

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

func (*ConfigurationRequest) Reset

func (x *ConfigurationRequest) Reset()

func (*ConfigurationRequest) String

func (x *ConfigurationRequest) String() string

type ConfigurationResponse

type ConfigurationResponse struct {
	Configuration *agentcfg.AgentConfiguration `protobuf:"bytes,1,opt,name=configuration,proto3" json:"configuration,omitempty"`
	CommitId      string                       `protobuf:"bytes,2,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigurationResponse) Descriptor deprecated

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

Deprecated: Use ConfigurationResponse.ProtoReflect.Descriptor instead.

func (*ConfigurationResponse) GetCommitId

func (x *ConfigurationResponse) GetCommitId() string

func (*ConfigurationResponse) GetConfiguration

func (x *ConfigurationResponse) GetConfiguration() *agentcfg.AgentConfiguration

func (*ConfigurationResponse) ProtoMessage

func (*ConfigurationResponse) ProtoMessage()

func (*ConfigurationResponse) ProtoReflect

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

func (*ConfigurationResponse) Reset

func (x *ConfigurationResponse) Reset()

func (*ConfigurationResponse) String

func (x *ConfigurationResponse) String() string

type ConfigurationWatcher

type ConfigurationWatcher struct {
	Log                *slog.Logger
	Client             AgentConfigurationClient
	PollConfig         retry.PollConfigFactory
	ConfigPreProcessor func(ConfigurationData) error
}

func (*ConfigurationWatcher) Watch

type ConfigurationWatcherInterface

type ConfigurationWatcherInterface interface {
	Watch(context.Context, ConfigurationCallback)
}

ConfigurationWatcherInterface abstracts ConfigurationWatcher.

type UnimplementedAgentConfigurationServer

type UnimplementedAgentConfigurationServer struct{}

UnimplementedAgentConfigurationServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

type UnsafeAgentConfigurationServer

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

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

Jump to

Keyboard shortcuts

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