Documentation
¶
Index ¶
- type Backend
- func (b Backend) ApplicationNamespaces(ctx Context, drpcName, drpcNamespace string) ([]string, error)
- func (b Backend) CheckS3(ctx Context, profiles []*s3.Profile) <-chan s3.Result
- func (b Backend) Gather(ctx Context, clusters []*types.Cluster, options gathering.Options) <-chan gathering.Result
- func (b Backend) GatherS3(ctx Context, profiles []*s3.Profile, prefixes []string, outputDir string) <-chan s3.Result
- func (b Backend) Validate(ctx Context) error
- type Context
- type ContextFunc
- type Mock
- func (m *Mock) ApplicationNamespaces(ctx Context, drpcName, drpcNamespace string) ([]string, error)
- func (m *Mock) CheckS3(ctx Context, profiles []*s3.Profile) <-chan s3.Result
- func (m *Mock) Gather(ctx Context, clusters []*types.Cluster, options gathering.Options) <-chan gathering.Result
- func (m *Mock) GatherS3(ctx Context, profiles []*s3.Profile, prefixes []string, outputDir string) <-chan s3.Result
- func (m *Mock) Validate(ctx Context) error
- type Validation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct{}
Backend performs validation with real clusters.
func (Backend) ApplicationNamespaces ¶ added in v0.9.0
func (b Backend) ApplicationNamespaces( ctx Context, drpcName, drpcNamespace string, ) ([]string, error)
ApplicationNamespaces inspects the application DRPC and returns the application namespaces on the hub and managed clusters.
type Context ¶
type Context interface {
Env() *types.Env
Config() *config.Config
Logger() *zap.SugaredLogger
Context() context.Context
}
Context is validation context, decoupling the ramenctl command from the backend implementation.
type ContextFunc ¶
type Mock ¶
type Mock struct {
ValidateFunc ContextFunc
ApplicationNamespacesFunc func(ctx Context, drpcName, drpcNamespace string) ([]string, error)
GatherFunc func(ctx Context, clsuters []*types.Cluster, options gathering.Options) <-chan gathering.Result
GatherS3Func func(ctx Context, profiles []*s3.Profile, prefixes []string, outputDir string) <-chan s3.Result
CheckS3Func func(ctx Context, profiles []*s3.Profile) <-chan s3.Result
}
Mock implements the Validation interface. All operations succeed without accessing the clusters. To cause operations to fail or return non default values, set a function returning an error.
func (*Mock) ApplicationNamespaces ¶ added in v0.9.0
type Validation ¶
type Validation interface {
Validate(ctx Context) error
ApplicationNamespaces(ctx Context, drpcName, drpcNamespace string) ([]string, error)
Gather(
ctx Context,
clusters []*types.Cluster,
options gathering.Options,
) <-chan gathering.Result
GatherS3(
ctx Context,
profiles []*s3.Profile,
prefixes []string,
outputDir string,
) <-chan s3.Result
CheckS3(ctx Context, profiles []*s3.Profile) <-chan s3.Result
}
Validation provides the validation operations.
Click to show internal directories.
Click to hide internal directories.