istio: Index | Files

package galley

import ""


Package Files

client.go galley.go kube.go native.go snapshot.go

type Config Uses

type Config struct {

    // SinkAddress to dial-out to, if set.
    SinkAddress string

    // MeshConfig to use for this instance.
    MeshConfig string

    // CreateClient determines if a real connection should be established with Galley. This is a workaround
    // to support Kubernetes environments where Galley is not running.
    // This field is ignored on native
    // TODO( remove this field
    CreateClient bool

    // Cluster to be used in a multicluster environment
    Cluster resource.Cluster

Config for Galley

type Instance Uses

type Instance interface {

    // Address of the Galley MCP Server.
    Address() string

    // ApplyConfig applies the given config yaml text via Galley.
    ApplyConfig(ns namespace.Instance, yamlText ...string) error

    // ApplyConfigOrFail applies the given config yaml text via Galley.
    ApplyConfigOrFail(t test.Failer, ns namespace.Instance, yamlText ...string)

    // DeleteConfig deletes the given config yaml text via Galley.
    DeleteConfig(ns namespace.Instance, yamlText ...string) error

    // DeleteConfigOrFail deletes the given config yaml text via Galley.
    DeleteConfigOrFail(t test.Failer, ns namespace.Instance, yamlText ...string)

    // ApplyConfigDir recursively applies all the config files in the specified directory
    ApplyConfigDir(ns namespace.Instance, configDir string) error

    // ClearConfig clears all applied config so far.
    ClearConfig() error

    // SetMeshConfig applies the given mesh config.
    SetMeshConfig(meshCfg string) error

    // SetMeshConfigOrFail calls SetMeshConfig and fails tests if an error is returned.
    SetMeshConfigOrFail(t test.Failer, meshCfg string)

    // WaitForSnapshot waits until the given snapshot is observed for the given type URL.
    WaitForSnapshot(collection string, validator SnapshotValidatorFunc) error

    // WaitForSnapshotOrFail calls WaitForSnapshot and fails the test if it fails.
    WaitForSnapshotOrFail(t test.Failer, collection string, validator SnapshotValidatorFunc)

Instance of Galley

func New Uses

func New(ctx resource.Context, cfg Config) (i Instance, err error)

New returns a new instance of echo.

func NewOrFail Uses

func NewOrFail(t test.Failer, c resource.Context, cfg Config) Instance

NewOrFail returns a new Galley instance, or fails test.

type SnapshotObject Uses

type SnapshotObject struct {
    TypeURL  string        `protobuf:"bytes,1,opt,name=TypeURL,proto3" json:"TypeURL,omitempty"`
    Metadata *mcp.Metadata `protobuf:"bytes,2,opt,name=Metadata,proto3" json:"Metadata,omitempty"`
    Body     proto.Message `protobuf:"bytes,3,opt,name=Body,proto3" json:"Body,omitempty"`

SnapshotObject contains a decoded versioned object with metadata received from the server.

func (*SnapshotObject) ProtoMessage Uses

func (*SnapshotObject) ProtoMessage()

func (*SnapshotObject) Reset Uses

func (m *SnapshotObject) Reset()

func (*SnapshotObject) String Uses

func (m *SnapshotObject) String() string

type SnapshotValidatorFunc Uses

type SnapshotValidatorFunc func(actuals []*SnapshotObject) error

SnapshotValidatorFunc validates the given snapshot objects returned from Galley.

func NewGoldenSnapshotValidator Uses

func NewGoldenSnapshotValidator(goldens []map[string]interface{}) SnapshotValidatorFunc

NewGoldenSnapshotValidator creates a SnapshotValidatorFunc that tests for equivalence against a set of golden object.

func NewSingleObjectSnapshotValidator Uses

func NewSingleObjectSnapshotValidator(ns string, fn func(ns string, actual *SnapshotObject) error) SnapshotValidatorFunc

NewSingleObjectSnapshotValidator creates a SnapshotValidatorFunc that ensures only a single object is found in the snapshot.

Package galley imports 35 packages (graph) and is imported by 11 packages. Updated 2020-04-07. Refresh now. Tools for package owners.