Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // SinkAddress to dial-out to, if set. SinkAddress string // MeshConfig to use for this instance. MeshConfig string }
Config for Galley
type Instance ¶
type Instance interface { resource.Resource // 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 *testing.T, 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 *testing.T, 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 // WaitForSnapshot waits until the given snapshot is observed for the given type URL. WaitForSnapshot(collection string, validator SnapshotValidatorFunc) error }
Instance of Galley
type SnapshotObject ¶
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 ¶
func (*SnapshotObject) ProtoMessage()
func (*SnapshotObject) Reset ¶
func (m *SnapshotObject) Reset()
func (*SnapshotObject) String ¶
func (m *SnapshotObject) String() string
type SnapshotValidatorFunc ¶
type SnapshotValidatorFunc func(actuals []*SnapshotObject) error
SnapshotValidatorFunc validates the given snapshot objects returned from Galley.
func NewGoldenSnapshotValidator ¶
func NewGoldenSnapshotValidator(goldens []map[string]interface{}) SnapshotValidatorFunc
NewGoldenSnapshotValidator creates a SnapshotValidatorFunc that tests for equivalence against a set of golden object.
func NewSingleObjectSnapshotValidator ¶
func NewSingleObjectSnapshotValidator(fn func(actual *SnapshotObject) error) SnapshotValidatorFunc
NewSingleObjectSnapshotValidator creates a SnapshotValidatorFunc that ensures only a single object is found in the snapshot.
Click to show internal directories.
Click to hide internal directories.