istio: Index | Files

package resource

import ""


Package Files

context.go dumper.go environment.go resource.go setup.go

func UnsupportedEnvironment Uses

func UnsupportedEnvironment(env Environment) error

UnsupportedEnvironment generates an error indicating that the given environment is not supported.

type Context Uses

type Context interface {
    // TrackResource tracks a resource in this context. If the context is closed, then the resource will be
    // cleaned up.
    TrackResource(r Resource) ID

    // The Environment in which the tests run
    Environment() Environment

    // Settings returns common settings
    Settings() *core.Settings

    // CreateDirectory creates a new subdirectory within this context.
    CreateDirectory(name string) (string, error)

    // CreateTmpDirectory creates a new temporary directory within this context.
    CreateTmpDirectory(prefix string) (string, error)

Context is the core context interface that is used by resources.

type Dumper Uses

type Dumper interface {

Dumper is an interface that is implemented by all components that can dump their state. In CI, it is useful to get as much context as possible when a test fails. Dumper allows dumping of state from a test.

type Environment Uses

type Environment interface {

    EnvironmentName() environment.Name

    // Case calls the given function if this environment has the given name.
    Case(e environment.Name, fn func())

Environment is the ambient environment that the test runs in.

type ID Uses

type ID interface {

ID for the resource instance. This is allocated by the framework and passed here.

type Resource Uses

type Resource interface {

    // Debugging ID for the resource instance.
    ID() ID

Resource of a resource.

type SetupFn Uses

type SetupFn func(ctx Context) error

SetupFn is a function used for performing setup actions.

Package resource imports 3 packages (graph) and is imported by 54 packages. Updated 2019-07-12. Refresh now. Tools for package owners.