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) GetCommitId() string
- func (*ConfigurationRequest) ProtoMessage()
- func (x *ConfigurationRequest) ProtoReflect() protoreflect.Message
- func (x *ConfigurationRequest) Reset()
- func (x *ConfigurationRequest) String() 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
- 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) (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.
func NewAgentConfigurationClient ¶
func NewAgentConfigurationClient(cc grpc.ClientConnInterface) AgentConfigurationClient
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 ¶
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.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedAgentConfigurationServer) GetConfiguration ¶
func (UnimplementedAgentConfigurationServer) GetConfiguration(*ConfigurationRequest, grpc.ServerStreamingServer[ConfigurationResponse]) 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.