rpc

package
v17.2.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: MIT Imports: 27 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) (AgentConfiguration_GetConfigurationClient, 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, AgentConfiguration_GetConfigurationServer) 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 interface {
	Recv() (*ConfigurationResponse, error)
	grpc.ClientStream
}

type AgentConfiguration_GetConfigurationServer

type AgentConfiguration_GetConfigurationServer interface {
	Send(*ConfigurationResponse) error
	grpc.ServerStream
}

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

func (*ConfigurationRequest) Validate

func (m *ConfigurationRequest) Validate() error

Validate checks the field values on ConfigurationRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ConfigurationRequest) ValidateAll

func (m *ConfigurationRequest) ValidateAll() error

ValidateAll checks the field values on ConfigurationRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConfigurationRequestMultiError, or nil if none found.

type ConfigurationRequestMultiError

type ConfigurationRequestMultiError []error

ConfigurationRequestMultiError is an error wrapping multiple validation errors returned by ConfigurationRequest.ValidateAll() if the designated constraints aren't met.

func (ConfigurationRequestMultiError) AllErrors

func (m ConfigurationRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ConfigurationRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ConfigurationRequestValidationError

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

ConfigurationRequestValidationError is the validation error returned by ConfigurationRequest.Validate if the designated constraints aren't met.

func (ConfigurationRequestValidationError) Cause

Cause function returns cause value.

func (ConfigurationRequestValidationError) Error

Error satisfies the builtin error interface

func (ConfigurationRequestValidationError) ErrorName

ErrorName returns error name.

func (ConfigurationRequestValidationError) Field

Field function returns field value.

func (ConfigurationRequestValidationError) Key

Key function returns key value.

func (ConfigurationRequestValidationError) Reason

Reason function returns reason value.

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

func (*ConfigurationResponse) Validate

func (m *ConfigurationResponse) Validate() error

Validate checks the field values on ConfigurationResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ConfigurationResponse) ValidateAll

func (m *ConfigurationResponse) ValidateAll() error

ValidateAll checks the field values on ConfigurationResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConfigurationResponseMultiError, or nil if none found.

type ConfigurationResponseMultiError

type ConfigurationResponseMultiError []error

ConfigurationResponseMultiError is an error wrapping multiple validation errors returned by ConfigurationResponse.ValidateAll() if the designated constraints aren't met.

func (ConfigurationResponseMultiError) AllErrors

func (m ConfigurationResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ConfigurationResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ConfigurationResponseValidationError

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

ConfigurationResponseValidationError is the validation error returned by ConfigurationResponse.Validate if the designated constraints aren't met.

func (ConfigurationResponseValidationError) Cause

Cause function returns cause value.

func (ConfigurationResponseValidationError) Error

Error satisfies the builtin error interface

func (ConfigurationResponseValidationError) ErrorName

ErrorName returns error name.

func (ConfigurationResponseValidationError) Field

Field function returns field value.

func (ConfigurationResponseValidationError) Key

Key function returns key value.

func (ConfigurationResponseValidationError) Reason

Reason function returns reason value.

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.

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