Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAgentConfigurationServer(s grpc.ServiceRegistrar, srv AgentConfigurationServer)
- type AgentConfigurationClient
- type AgentConfigurationServer
- type AgentConfiguration_GetConfigurationClient
- type AgentConfiguration_GetConfigurationServer
- type ConfigurationCallback
- type ConfigurationData
- type ConfigurationRequest
- func (*ConfigurationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ConfigurationRequest) GetAgentMeta() *entity.AgentMeta
- func (x *ConfigurationRequest) GetCommitId() string
- func (*ConfigurationRequest) ProtoMessage()
- func (x *ConfigurationRequest) ProtoReflect() protoreflect.Message
- func (x *ConfigurationRequest) Reset()
- func (x *ConfigurationRequest) String() string
- func (m *ConfigurationRequest) Validate() error
- func (m *ConfigurationRequest) ValidateAll() error
- type ConfigurationRequestMultiError
- type ConfigurationRequestValidationError
- func (e ConfigurationRequestValidationError) Cause() error
- func (e ConfigurationRequestValidationError) Error() string
- func (e ConfigurationRequestValidationError) ErrorName() string
- func (e ConfigurationRequestValidationError) Field() string
- func (e ConfigurationRequestValidationError) Key() bool
- func (e ConfigurationRequestValidationError) Reason() string
- type ConfigurationResponse
- func (*ConfigurationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ConfigurationResponse) GetCommitId() string
- func (x *ConfigurationResponse) GetConfiguration() *agentcfg.AgentConfiguration
- func (*ConfigurationResponse) ProtoMessage()
- func (x *ConfigurationResponse) ProtoReflect() protoreflect.Message
- func (x *ConfigurationResponse) Reset()
- func (x *ConfigurationResponse) String() string
- func (m *ConfigurationResponse) Validate() error
- func (m *ConfigurationResponse) ValidateAll() error
- type ConfigurationResponseMultiError
- type ConfigurationResponseValidationError
- func (e ConfigurationResponseValidationError) Cause() error
- func (e ConfigurationResponseValidationError) Error() string
- func (e ConfigurationResponseValidationError) ErrorName() string
- func (e ConfigurationResponseValidationError) Field() string
- func (e ConfigurationResponseValidationError) Key() bool
- func (e ConfigurationResponseValidationError) Reason() string
- type ConfigurationWatcher
- type ConfigurationWatcherInterface
- type UnimplementedAgentConfigurationServer
- type UnsafeAgentConfigurationServer
Constants ¶
const (
AgentConfiguration_GetConfiguration_FullMethodName = "/gitlab.agent.agent_configuration.rpc.AgentConfiguration/GetConfiguration"
)
Variables ¶
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)
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.
func NewAgentConfigurationClient ¶
func NewAgentConfigurationClient(cc grpc.ClientConnInterface) AgentConfigurationClient
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 *entity.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() *entity.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, 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 ¶
func (m ConfigurationRequestMultiError) Error() string
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 ¶
func (e ConfigurationRequestValidationError) Cause() error
Cause function returns cause value.
func (ConfigurationRequestValidationError) Error ¶
func (e ConfigurationRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ConfigurationRequestValidationError) ErrorName ¶
func (e ConfigurationRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ConfigurationRequestValidationError) Field ¶
func (e ConfigurationRequestValidationError) Field() string
Field function returns field value.
func (ConfigurationRequestValidationError) Key ¶
func (e ConfigurationRequestValidationError) Key() bool
Key function returns key value.
func (ConfigurationRequestValidationError) Reason ¶
func (e ConfigurationRequestValidationError) Reason() string
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 ¶
func (m ConfigurationResponseMultiError) Error() string
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 ¶
func (e ConfigurationResponseValidationError) Cause() error
Cause function returns cause value.
func (ConfigurationResponseValidationError) Error ¶
func (e ConfigurationResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ConfigurationResponseValidationError) ErrorName ¶
func (e ConfigurationResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ConfigurationResponseValidationError) Field ¶
func (e ConfigurationResponseValidationError) Field() string
Field function returns field value.
func (ConfigurationResponseValidationError) Key ¶
func (e ConfigurationResponseValidationError) Key() bool
Key function returns key value.
func (ConfigurationResponseValidationError) Reason ¶
func (e ConfigurationResponseValidationError) Reason() string
Reason function returns reason value.
type ConfigurationWatcher ¶
type ConfigurationWatcher struct { Log *zap.Logger AgentMeta *entity.AgentMeta Client AgentConfigurationClient PollConfig retry.PollConfigFactory ConfigPreProcessor func(ConfigurationData) error }
func (*ConfigurationWatcher) Watch ¶
func (w *ConfigurationWatcher) Watch(ctx context.Context, callback ConfigurationCallback)
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.
func (UnimplementedAgentConfigurationServer) GetConfiguration ¶
func (UnimplementedAgentConfigurationServer) GetConfiguration(*ConfigurationRequest, AgentConfiguration_GetConfigurationServer) error
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.