rpc

package
v14.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

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"`
	AgentMeta *modshared.AgentMeta `protobuf:"bytes,2,opt,name=agent_meta,json=agentMeta,proto3" json:"agent_meta,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigurationRequest) Descriptor deprecated

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

Deprecated: Use ConfigurationRequest.ProtoReflect.Descriptor instead.

func (*ConfigurationRequest) GetAgentMeta

func (x *ConfigurationRequest) GetAgentMeta() *modshared.AgentMeta

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, an error is returned.

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, an error is returned.

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        *zap.Logger
	AgentMeta  *modshared.AgentMeta
	Client     AgentConfigurationClient
	PollConfig retry.PollConfigFactory
}

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