Documentation
¶
Index ¶
- Variables
- type CommandExecutor
- func (e *CommandExecutor) ExecuteCommand(cmd *exec.Cmd, logPrefix string) error
- func (e *CommandExecutor) ExecuteCommandStreamFromS3(ctx context.Context, cmd *exec.Cmd, factory ObjectStorageFactory, ...) error
- func (e *CommandExecutor) ExecuteCommandStreamToS3(ctx context.Context, cmd *exec.Cmd, factory ObjectStorageFactory, ...) error
- func (e *CommandExecutor) ExecutePipedCommands(cmd1 *exec.Cmd, cmd2 *exec.Cmd, logPrefix string) error
- type Empty
- type EventRecorder
- type ObjectStorage
- func (*ObjectStorage) Descriptor() ([]byte, []int)deprecated
- func (s *ObjectStorage) GenerateFactory() (ObjectStorageFactory, error)
- func (x *ObjectStorage) GetAccessKey() string
- func (x *ObjectStorage) GetBucket() string
- func (x *ObjectStorage) GetEndpoint() string
- func (x *ObjectStorage) GetSecretKey() string
- func (x *ObjectStorage) GetSsl() bool
- func (x *ObjectStorage) GetType() ObjectStorageType
- func (*ObjectStorage) ProtoMessage()
- func (x *ObjectStorage) ProtoReflect() protoreflect.Message
- func (x *ObjectStorage) Reset()
- func (x *ObjectStorage) String() string
- type ObjectStorageFactory
- type ObjectStorageType
- func (ObjectStorageType) Descriptor() protoreflect.EnumDescriptor
- func (x ObjectStorageType) Enum() *ObjectStorageType
- func (ObjectStorageType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ObjectStorageType) Number() protoreflect.EnumNumber
- func (x ObjectStorageType) String() string
- func (ObjectStorageType) Type() protoreflect.EnumType
- type ResourceFactory
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ObjectStorageType_name = map[int32]string{ 0: "Minio", 1: "Aws", } ObjectStorageType_value = map[string]int32{ "Minio": 0, "Aws": 1, } )
Enum value maps for ObjectStorageType.
View Source
var File_pkg_agent_app_common_pb_common_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CommandExecutor ¶
type CommandExecutor struct {
// contains filtered or unexported fields
}
CommandExecutor encapsulates command execution logic
func NewCommandExecutor ¶
func NewCommandExecutor(logger *zap.SugaredLogger) *CommandExecutor
NewCommandExecutor creates a new command executor
func (*CommandExecutor) ExecuteCommand ¶
func (e *CommandExecutor) ExecuteCommand(cmd *exec.Cmd, logPrefix string) error
ExecuteCommand executes a single command with stderr logging
func (*CommandExecutor) ExecuteCommandStreamFromS3 ¶ added in v1.1.1
func (e *CommandExecutor) ExecuteCommandStreamFromS3(ctx context.Context, cmd *exec.Cmd, factory ObjectStorageFactory, bucket, object, logPrefix string) error
func (*CommandExecutor) ExecuteCommandStreamToS3 ¶ added in v1.1.1
func (e *CommandExecutor) ExecuteCommandStreamToS3(ctx context.Context, cmd *exec.Cmd, factory ObjectStorageFactory, bucket, object, logPrefix string) error
func (*CommandExecutor) ExecutePipedCommands ¶
func (e *CommandExecutor) ExecutePipedCommands(cmd1 *exec.Cmd, cmd2 *exec.Cmd, logPrefix string) error
ExecutePipedCommands executes two commands with pipe connection
type Empty ¶ added in v1.1.1
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
added in
v1.1.1
func (*Empty) ProtoMessage ¶ added in v1.1.1
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶ added in v1.1.1
func (x *Empty) ProtoReflect() protoreflect.Message
type EventRecorder ¶
type EventRecorder struct {
record.EventRecorder
// contains filtered or unexported fields
}
func NewEventRecorder ¶ added in v1.1.1
func NewEventRecorder() (*EventRecorder, error)
func (*EventRecorder) SendNormalEventToUnit ¶
func (s *EventRecorder) SendNormalEventToUnit(name, namespace, reason, msg string) error
func (*EventRecorder) SendWarningEventToUnit ¶
func (s *EventRecorder) SendWarningEventToUnit(name, namespace, reason, msg string) error
type ObjectStorage ¶ added in v1.1.1
type ObjectStorage struct {
Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
AccessKey string `protobuf:"bytes,3,opt,name=access_key,json=accessKey,proto3" json:"access_key,omitempty"`
SecretKey string `protobuf:"bytes,4,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"`
Ssl bool `protobuf:"varint,5,opt,name=ssl,proto3" json:"ssl,omitempty"`
Type ObjectStorageType `protobuf:"varint,6,opt,name=type,proto3,enum=common.ObjectStorageType" json:"type,omitempty"`
// contains filtered or unexported fields
}
func (*ObjectStorage) Descriptor
deprecated
added in
v1.1.1
func (*ObjectStorage) Descriptor() ([]byte, []int)
Deprecated: Use ObjectStorage.ProtoReflect.Descriptor instead.
func (*ObjectStorage) GenerateFactory ¶ added in v1.1.1
func (s *ObjectStorage) GenerateFactory() (ObjectStorageFactory, error)
func (*ObjectStorage) GetAccessKey ¶ added in v1.1.1
func (x *ObjectStorage) GetAccessKey() string
func (*ObjectStorage) GetBucket ¶ added in v1.1.1
func (x *ObjectStorage) GetBucket() string
func (*ObjectStorage) GetEndpoint ¶ added in v1.1.1
func (x *ObjectStorage) GetEndpoint() string
func (*ObjectStorage) GetSecretKey ¶ added in v1.1.1
func (x *ObjectStorage) GetSecretKey() string
func (*ObjectStorage) GetSsl ¶ added in v1.1.1
func (x *ObjectStorage) GetSsl() bool
func (*ObjectStorage) GetType ¶ added in v1.1.1
func (x *ObjectStorage) GetType() ObjectStorageType
func (*ObjectStorage) ProtoMessage ¶ added in v1.1.1
func (*ObjectStorage) ProtoMessage()
func (*ObjectStorage) ProtoReflect ¶ added in v1.1.1
func (x *ObjectStorage) ProtoReflect() protoreflect.Message
func (*ObjectStorage) Reset ¶ added in v1.1.1
func (x *ObjectStorage) Reset()
func (*ObjectStorage) String ¶ added in v1.1.1
func (x *ObjectStorage) String() string
type ObjectStorageFactory ¶ added in v1.1.1
type ObjectStorageFactory interface {
PutFile(ctx context.Context, bucket, object, path string) error
GetFile(ctx context.Context, bucket, object, path string) error
PutObject(ctx context.Context, bucket, objectName string, reader io.Reader) error
GetObject(ctx context.Context, bucket, object string) (io.ReadCloser, error)
}
type ObjectStorageType ¶ added in v1.1.1
type ObjectStorageType int32
const ( ObjectStorageType_Minio ObjectStorageType = 0 ObjectStorageType_Aws ObjectStorageType = 1 // preserve )
func (ObjectStorageType) Descriptor ¶ added in v1.1.1
func (ObjectStorageType) Descriptor() protoreflect.EnumDescriptor
func (ObjectStorageType) Enum ¶ added in v1.1.1
func (x ObjectStorageType) Enum() *ObjectStorageType
func (ObjectStorageType) EnumDescriptor
deprecated
added in
v1.1.1
func (ObjectStorageType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ObjectStorageType.Descriptor instead.
func (ObjectStorageType) Number ¶ added in v1.1.1
func (x ObjectStorageType) Number() protoreflect.EnumNumber
func (ObjectStorageType) String ¶ added in v1.1.1
func (x ObjectStorageType) String() string
func (ObjectStorageType) Type ¶ added in v1.1.1
func (ObjectStorageType) Type() protoreflect.EnumType
type ResourceFactory ¶ added in v1.1.1
type ResourceFactory struct {
// contains filtered or unexported fields
}
func NewResourceFactory ¶ added in v1.1.1
func NewResourceFactory(ctx context.Context, logger *zap.SugaredLogger, name, namespace string) (*ResourceFactory, error)
func (*ResourceFactory) WriteConfigMapToFile ¶ added in v1.1.1
func (f *ResourceFactory) WriteConfigMapToFile(ctx context.Context, confDir, key string) error
func (*ResourceFactory) WriteFileToConfigMap ¶ added in v1.1.1
func (f *ResourceFactory) WriteFileToConfigMap(ctx context.Context, confDir, key string) error
Click to show internal directories.
Click to hide internal directories.