Documentation ¶
Index ¶
- type Mock
- func (m *Mock) AllWorkloads(ctx context.Context, maybeNamespace string) ([]cluster.Workload, error)
- func (m *Mock) AppendManifestToBuffer(b []byte, buf *bytes.Buffer) error
- func (m *Mock) ApplyManifestPatch(originalManifests, patch []byte, originalSource, patchSource string) ([]byte, error)
- func (m *Mock) CreateManifestPatch(originalManifests, modifiedManifests []byte, ...) ([]byte, error)
- func (m *Mock) Export(ctx context.Context) ([]byte, error)
- func (m *Mock) IsAllowedResource(id resource.ID) bool
- func (m *Mock) LoadManifests(baseDir string, paths []string) (map[string]resource.Resource, error)
- func (m *Mock) ParseManifest(def []byte, source string) (map[string]resource.Resource, error)
- func (m *Mock) Ping() error
- func (m *Mock) PublicSSHKey(regenerate bool) (ssh.PublicKey, error)
- func (m *Mock) SetWorkloadContainerImage(def []byte, id resource.ID, container string, newImageID image.Ref) ([]byte, error)
- func (m *Mock) SomeWorkloads(ctx context.Context, ids []resource.ID) ([]cluster.Workload, error)
- func (m *Mock) Sync(c cluster.SyncSet) error
- func (m *Mock) UpdateWorkloadPolicies(def []byte, id resource.ID, p resource.PolicyUpdate) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶
type Mock struct { AllWorkloadsFunc func(ctx context.Context, maybeNamespace string) ([]cluster.Workload, error) SomeWorkloadsFunc func(ctx context.Context, ids []resource.ID) ([]cluster.Workload, error) IsAllowedResourceFunc func(resource.ID) bool PingFunc func() error ExportFunc func(ctx context.Context) ([]byte, error) SyncFunc func(cluster.SyncSet) error PublicSSHKeyFunc func(regenerate bool) (ssh.PublicKey, error) SetWorkloadContainerImageFunc func(def []byte, id resource.ID, container string, newImageID image.Ref) ([]byte, error) LoadManifestsFunc func(base string, paths []string) (map[string]resource.Resource, error) ParseManifestFunc func(def []byte, source string) (map[string]resource.Resource, error) UpdateWorkloadPoliciesFunc func([]byte, resource.ID, resource.PolicyUpdate) ([]byte, error) CreateManifestPatchFunc func(originalManifests, modifiedManifests []byte, originalSource, modifiedSource string) ([]byte, error) ApplyManifestPatchFunc func(originalManifests, patch []byte, originalSource, patchSource string) ([]byte, error) AppendManifestToBufferFunc func([]byte, *bytes.Buffer) error }
Doubles as a cluster.Cluster and cluster.Manifests implementation
func (*Mock) AllWorkloads ¶
func (*Mock) AppendManifestToBuffer ¶
func (*Mock) ApplyManifestPatch ¶
func (*Mock) CreateManifestPatch ¶
func (*Mock) LoadManifests ¶
func (*Mock) ParseManifest ¶
func (*Mock) SetWorkloadContainerImage ¶
func (*Mock) SomeWorkloads ¶
func (*Mock) UpdateWorkloadPolicies ¶
Click to show internal directories.
Click to hide internal directories.