services

package
v1.15.0-beta13 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 59 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHost       = "127.0.0.1"
	DefaultPort       = 8200
	DefaultVaultToken = "root"
)

Variables

This section is empty.

Functions

func AllocateGlooPort

func AllocateGlooPort() int32

func RunPetstore added in v0.18.3

func RunPetstore(ctx context.Context, port int) error

Types

type ConsulFactory

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

func NewConsulFactory

func NewConsulFactory() (*ConsulFactory, error)

NewConsulFactory returns a ConsulFactory

func (*ConsulFactory) Clean

func (cf *ConsulFactory) Clean() error

func (*ConsulFactory) MustConsulInstance added in v1.14.0

func (cf *ConsulFactory) MustConsulInstance() *ConsulInstance

func (*ConsulFactory) NewConsulInstance

func (cf *ConsulFactory) NewConsulInstance() (*ConsulInstance, error)

type ConsulInstance

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

func (*ConsulInstance) AddConfig

func (i *ConsulInstance) AddConfig(svcId, content string) error

func (*ConsulInstance) AddConfigFromStruct

func (i *ConsulInstance) AddConfigFromStruct(svcId string, cfg interface{}) error

func (*ConsulInstance) Binary

func (i *ConsulInstance) Binary() string

func (*ConsulInstance) Clean

func (i *ConsulInstance) Clean()

Clean stops the ConsulInstance

func (*ConsulInstance) Client added in v1.14.7

func (i *ConsulInstance) Client() *api.Client

Client returns the Consul API client, constructing one if necessary

func (*ConsulInstance) Put added in v1.14.7

func (i *ConsulInstance) Put(key string, value []byte) error

Put wraps the Consul KV Put API call

func (*ConsulInstance) RegisterLiveService added in v1.13.0

func (i *ConsulInstance) RegisterLiveService(svcName, svcId, address string, tags []string, port uint32) error

RegisterLiveService While it may be tempting to just reload all config using `consul reload` or marshalling new json and sending SIGHUP to the process (per https://www.consul.io/commands/reload), it is preferable to live update using the consul APIs as this is a more realistic flow and doesn't fire our watches too actively (which can both make debugging hard and hide bugs)

func (*ConsulInstance) RegisterService added in v0.17.4

func (i *ConsulInstance) RegisterService(svcName, svcId, address string, tags []string, port uint32) error

func (*ConsulInstance) ReloadConfig

func (i *ConsulInstance) ReloadConfig() error

func (*ConsulInstance) Run

func (i *ConsulInstance) Run(ctx context.Context) error

Run starts the ConsulInstance When the provided context is Done, the ConsulInstance is cleaned up

func (*ConsulInstance) Silence

func (i *ConsulInstance) Silence()

type ExtensionsBuilders added in v1.15.0

type ExtensionsBuilders struct {
	Gloo func(ctx context.Context, opts bootstrap.Opts) setup.Extensions
	Fds  func(ctx context.Context, opts bootstrap.Opts) fds_syncer.Extensions
}

type Ports added in v1.15.0

type Ports struct {
	Gloo       int32
	Validation int32
	RestXds    int32
}

type RunOptions

type RunOptions struct {
	NsToWrite string
	NsToWatch []string
	WhatToRun What
	Settings  *gloov1.Settings

	// ExtensionsBuilders are injection points for Enterprise functionality
	ExtensionsBuilders ExtensionsBuilders

	// Deprecated: do not write tests that require a Kubernetes client
	// This is an artifact of legacy tests which interacted with Kubernetes directly
	// If you need a KubeClient, you should be introducing a test in the `test/kube2e` package
	KubeClient kubernetes.Interface
	// contains filtered or unexported fields
}

RunOptions are options for running an in-memory e2e test

type TestClients

type TestClients struct {
	GatewayClient        gatewayv1.GatewayClient
	HttpGatewayClient    gatewayv1.MatchableHttpGatewayClient
	TcpGatewayClient     gatewayv1.MatchableTcpGatewayClient
	VirtualServiceClient gatewayv1.VirtualServiceClient
	ProxyClient          gloov1.ProxyClient
	UpstreamClient       gloov1.UpstreamClient
	SecretClient         gloov1.SecretClient
	ArtifactClient       gloov1.ArtifactClient
	ServiceClient        skkube.ServiceClient

	AuthConfigClient      extauthv1.AuthConfigClient
	RateLimitConfigClient v1alpha1.RateLimitConfigClient
	GraphQLApiClient      graphqlv1beta1.GraphQLApiClient

	GlooPort    int
	RestXdsPort int
}

TestClients represents the set of ResourceClients available for tests

func RunGlooGatewayUdsFds

func RunGlooGatewayUdsFds(ctx context.Context, runOptions *RunOptions) TestClients

RunGlooGatewayUdsFds runs the Gloo Edge control plane components in goroutines and stores configuration in-memory. This is used by the e2e tests in `test/e2e` package.

func (TestClients) DeleteSnapshot added in v1.9.25

func (c TestClients) DeleteSnapshot(ctx context.Context, snapshot *gloosnapshot.ApiSnapshot) error

DeleteSnapshot deletes all resources in the ApiSnapshot from the cache

func (TestClients) WriteSnapshot added in v1.9.25

func (c TestClients) WriteSnapshot(ctx context.Context, snapshot *gloosnapshot.ApiSnapshot) error

WriteSnapshot writes all resources in the ApiSnapshot to the cache

type VaultFactory

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

func NewVaultFactory

func NewVaultFactory() (*VaultFactory, error)

NewVaultFactory returns a VaultFactory

func (*VaultFactory) Clean

func (vf *VaultFactory) Clean() error

func (*VaultFactory) MustVaultInstance added in v1.14.0

func (vf *VaultFactory) MustVaultInstance() *VaultInstance

func (*VaultFactory) NewVaultInstance

func (vf *VaultFactory) NewVaultInstance() (*VaultInstance, error)

type VaultInstance

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

func (*VaultInstance) Address added in v1.9.25

func (i *VaultInstance) Address() string

func (*VaultInstance) Binary

func (i *VaultInstance) Binary() string

func (*VaultInstance) Clean

func (i *VaultInstance) Clean()

func (*VaultInstance) EnableAWSAuthMethod added in v1.14.0

func (i *VaultInstance) EnableAWSAuthMethod(settings *v1.Settings_VaultSecrets, awsAuthRole string) error

func (*VaultInstance) EnableSecretEngine added in v1.9.25

func (i *VaultInstance) EnableSecretEngine(secretEngine string) error

func (*VaultInstance) Exec

func (i *VaultInstance) Exec(args ...string) (string, error)

func (*VaultInstance) Host added in v1.14.0

func (i *VaultInstance) Host() string

func (*VaultInstance) Run

func (i *VaultInstance) Run(ctx context.Context) error

func (*VaultInstance) Token

func (i *VaultInstance) Token() string

func (*VaultInstance) WriteSecret added in v1.14.0

func (i *VaultInstance) WriteSecret(secret *v1.Secret) error

WriteSecret persists a Secret in Vault

type What

type What struct {
	DisableGateway bool
	DisableUds     bool
	DisableFds     bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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