Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { RemoteTrimPolicy RemoteTrimPolicy `yaml:"remote_trim_policy"` LocalTrimPolicy LocalTrimPolicy `yaml:"local_trim_policy"` Stages map[string]ConfigStage `yaml:"-" validate:"required,dive"` RawStages map[string]yaml.Node `yaml:"stages"` }
type ConfigDriver ¶
type ConfigDriver interface { GetZfsDriver() domain.ZfsDriver GetStorageDriver() domain.StorageDriver GetMiddlewares() []domain.Middleware GetConfig() *Config }
type ConfigRepo ¶
type ConfigRepo interface { GetConfig() *Config GetMiddlewares() []domain.Middleware }
type ConfigStage ¶
type ConfigStage interface { Remote() string Type() ConfigType }
func NewCryptConfig ¶
func NewCryptConfig() ConfigStage
func NewS3Config ¶
func NewS3Config() ConfigStage
func NewThrottleConfig ¶
func NewThrottleConfig() ConfigStage
func NewZfsConfig ¶
func NewZfsConfig() ConfigStage
type CryptConfig ¶
type CryptConfig struct { Remote_ string `yaml:"remote" validate:"required"` Password string `yaml:"password" validate:"required"` // contains filtered or unexported fields }
func (*CryptConfig) Remote ¶
func (c *CryptConfig) Remote() string
func (*CryptConfig) Type ¶
func (c *CryptConfig) Type() ConfigType
type LoadParams ¶
type LoadParams struct { ConfigReader io.Reader StageMapping StageMap ZfsDriverFunc func(c *ZfsConfig) domain.ZfsDriver StorageDriverFunc func(s *S3Config) (domain.StorageDriver, error) ToMiddleware func(c ConfigStage) domain.Middleware }
type LocalTrimPolicy ¶
type LocalTrimPolicy string
func (*LocalTrimPolicy) GetFullCount ¶
func (e *LocalTrimPolicy) GetFullCount() int
func (*LocalTrimPolicy) GetIncrementalCount ¶
func (e *LocalTrimPolicy) GetIncrementalCount() int
type RemoteTrimPolicy ¶
type RemoteTrimPolicy string
func (*RemoteTrimPolicy) GetFullCount ¶
func (e *RemoteTrimPolicy) GetFullCount() int
func (*RemoteTrimPolicy) GetIncrementalCount ¶
func (e *RemoteTrimPolicy) GetIncrementalCount() int
type S3Config ¶
type S3Config struct { Bucket string `yaml:"bucket"` Region string `yaml:"region"` UsePathStyle bool `yaml:"usePathStyle"` BaseEndpoint string `yaml:"baseEndpoint"` Prefix string `yaml:"prefix"` AccessKey string `yaml:"accessKey"` AccessSecret string `yaml:"accessSecret"` MaxRetries int `yaml:"maxRetries"` UploadPartSize int `yaml:"uploadPartSize"` // contains filtered or unexported fields }
func (*S3Config) Type ¶
func (s *S3Config) Type() ConfigType
type StageMap ¶
type StageMap = map[string]func() ConfigStage
type ThrottleConfig ¶
type ThrottleConfig struct { Remote_ string `yaml:"remote" validate:"required"` WriteSpeed int64 `yaml:"writeSpeed" validate:"required"` //TODO: rename to writeSpeedByteSec ReadSpeed int64 `yaml:"readSpeed" validate:"required"` //TODO: rename to readSpeedByteSec // contains filtered or unexported fields }
func (*ThrottleConfig) Remote ¶
func (t *ThrottleConfig) Remote() string
func (*ThrottleConfig) Type ¶
func (t *ThrottleConfig) Type() ConfigType
Source Files ¶
Click to show internal directories.
Click to hide internal directories.