flux: github.com/weaveworks/flux/pkg/cluster/mock Index | Files

package mock

import "github.com/weaveworks/flux/pkg/cluster/mock"

Index

Package Files

mock.go

type Mock Uses

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 Uses

func (m *Mock) AllWorkloads(ctx context.Context, maybeNamespace string) ([]cluster.Workload, error)

func (*Mock) AppendManifestToBuffer Uses

func (m *Mock) AppendManifestToBuffer(b []byte, buf *bytes.Buffer) error

func (*Mock) ApplyManifestPatch Uses

func (m *Mock) ApplyManifestPatch(originalManifests, patch []byte, originalSource, patchSource string) ([]byte, error)

func (*Mock) CreateManifestPatch Uses

func (m *Mock) CreateManifestPatch(originalManifests, modifiedManifests []byte, originalSource, modifiedSource string) ([]byte, error)

func (*Mock) Export Uses

func (m *Mock) Export(ctx context.Context) ([]byte, error)

func (*Mock) IsAllowedResource Uses

func (m *Mock) IsAllowedResource(id resource.ID) bool

func (*Mock) LoadManifests Uses

func (m *Mock) LoadManifests(baseDir string, paths []string) (map[string]resource.Resource, error)

func (*Mock) ParseManifest Uses

func (m *Mock) ParseManifest(def []byte, source string) (map[string]resource.Resource, error)

func (*Mock) Ping Uses

func (m *Mock) Ping() error

func (*Mock) PublicSSHKey Uses

func (m *Mock) PublicSSHKey(regenerate bool) (ssh.PublicKey, error)

func (*Mock) SetWorkloadContainerImage Uses

func (m *Mock) SetWorkloadContainerImage(def []byte, id resource.ID, container string, newImageID image.Ref) ([]byte, error)

func (*Mock) SomeWorkloads Uses

func (m *Mock) SomeWorkloads(ctx context.Context, ids []resource.ID) ([]cluster.Workload, error)

func (*Mock) Sync Uses

func (m *Mock) Sync(c cluster.SyncSet) error

func (*Mock) UpdateWorkloadPolicies Uses

func (m *Mock) UpdateWorkloadPolicies(def []byte, id resource.ID, p resource.PolicyUpdate) ([]byte, error)

Package mock imports 7 packages (graph). Updated 2019-09-29. Refresh now. Tools for package owners.