env

package
v1.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2025 License: MIT Imports: 16 Imported by: 4

Documentation

Index

Constants

View Source
const (
	EnvURLVar              = "DEVNET_ENV_URL"
	ChainNameVar           = "DEVNET_CHAIN_NAME"
	NodeIndexVar           = "DEVNET_NODE_INDEX"
	ExpectPreconditionsMet = "DEVNET_EXPECT_PRECONDITIONS_MET"
)
View Source
const (
	KurtosisDevnetEnvArtifactNamePrefix = "devnet-descriptor-"
	KurtosisDevnetEnvArtifactPath       = "env.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainConfig

type ChainConfig struct {
	// contains filtered or unexported fields
}

func (*ChainConfig) GetEnv

func (c *ChainConfig) GetEnv(opts ...ChainConfigOption) (*ChainEnv, error)

type ChainConfigOption added in v1.11.1

type ChainConfigOption func(*ChainConfig, *chainConfigOpts) error

func WithCastIntegration added in v1.11.1

func WithCastIntegration(cast bool, nodeIndex int) ChainConfigOption

func WithExpectedPreconditions added in v1.11.1

func WithExpectedPreconditions(pre bool) ChainConfigOption

type ChainEnv

type ChainEnv struct {
	// contains filtered or unexported fields
}

func (*ChainEnv) ApplyToEnv added in v1.11.1

func (e *ChainEnv) ApplyToEnv(env []string) []string

func (*ChainEnv) GetMotd added in v1.11.1

func (e *ChainEnv) GetMotd() string

type DataFetcher added in v1.11.1

type DataFetcher func(*url.URL) (string, []byte, error)

DataFetcher is a function type for fetching data from a URL

type DevnetEnv

type DevnetEnv struct {
	Config descriptors.DevnetEnvironment
	Name   string
	URL    string
}

func LoadDevnetFromURL added in v1.11.1

func LoadDevnetFromURL(devnetURL string) (*DevnetEnv, error)

func (*DevnetEnv) GetChain

func (d *DevnetEnv) GetChain(chainName string) (*ChainConfig, error)

type EnclaveFS added in v1.11.1

type EnclaveFS interface {
	GetArtifact(ctx context.Context, name string) (*ktfs.Artifact, error)
	GetAllArtifactNames(ctx context.Context) ([]string, error)
	Close() error
}

EnclaveFS is an interface that both our mock and the real implementation satisfy

type NewEnclaveFSFunc added in v1.11.1

type NewEnclaveFSFunc func(ctx context.Context, enclave string) (EnclaveFS, error)

NewEnclaveFSFunc is the type for functions that create new enclave filesystems

var NewEnclaveFS NewEnclaveFSFunc = func(ctx context.Context, enclave string) (EnclaveFS, error) {
	fs, err := ktfs.NewEnclaveFS(ctx, enclave)
	if err != nil {
		return nil, err
	}
	return &enclaveFSWrapper{fs: fs}, nil
}

NewEnclaveFS is a variable that holds the function to create a new enclave filesystem It can be replaced in tests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL