Documentation
¶
Index ¶
- Constants
- func AdvanceBindPort(p *uint32) uint32
- func AllocateGlooPort() int32
- func NextBindPort() uint32
- func RunPetstore(ctx context.Context, port int) error
- type ConsulFactory
- type ConsulInstance
- func (i *ConsulInstance) AddConfig(svcId, content string) error
- func (i *ConsulInstance) AddConfigFromStruct(svcId string, cfg interface{}) error
- func (i *ConsulInstance) Binary() string
- func (i *ConsulInstance) Clean() error
- func (i *ConsulInstance) RegisterService(svcName, svcId, address string, tags []string, port uint32) error
- func (i *ConsulInstance) ReloadConfig() error
- func (i *ConsulInstance) Run() error
- func (i *ConsulInstance) Silence()
- type DockerOptions
- type EnvoyBootstrapBuilder
- type EnvoyFactory
- type EnvoyInstance
- func (ei *EnvoyInstance) Binary() string
- func (ei *EnvoyInstance) Clean()
- func (ei *EnvoyInstance) DisablePanicMode() error
- func (ei *EnvoyInstance) EnablePanicMode() error
- func (ei *EnvoyInstance) EnvoyConfigDump() (string, error)
- func (ei *EnvoyInstance) LocalAddr() string
- func (ei *EnvoyInstance) Logs() (string, error)
- func (ei *EnvoyInstance) Run(port int) error
- func (ei *EnvoyInstance) RunWith(eic EnvoyInstanceConfig) error
- func (ei *EnvoyInstance) RunWithConfigFile(port int, configFile string) error
- func (ei *EnvoyInstance) RunWithId(id string) error
- func (ei *EnvoyInstance) RunWithRole(role string, port int) error
- func (ei *EnvoyInstance) RunWithRoleAndRestXds(role string, glooPort, restXdsPort int) error
- type EnvoyInstanceConfig
- type NatsStreamingFactory
- type NatsStreamingInstance
- type PrometheusFactory
- type PrometheusInstance
- type QuoteUnquoteMesh
- type RunOptions
- type Runner
- type SafeBuffer
- type Service
- type StaticConfigs
- type TestClients
- type VaultFactory
- type VaultFactoryConfig
- type VaultInstance
- func (i *VaultInstance) Address() string
- func (i *VaultInstance) Binary() string
- func (i *VaultInstance) Clean() error
- func (i *VaultInstance) EnableSecretEngine(secretEngine string) error
- func (i *VaultInstance) Exec(args ...string) (string, error)
- func (i *VaultInstance) Run() error
- func (i *VaultInstance) RunWithAddress(address string) error
- func (i *VaultInstance) Token() string
- type What
Constants ¶
View Source
const (
DefaultProxyName = "default~proxy"
)
Variables ¶
This section is empty.
Functions ¶
func AdvanceBindPort ¶ added in v1.2.15
func AdvanceBindPort(p *uint32) uint32
func AllocateGlooPort ¶
func AllocateGlooPort() int32
func NextBindPort ¶
func NextBindPort() uint32
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)
func (*ConsulFactory) NewConsulInstance ¶
func (ef *ConsulFactory) NewConsulInstance() (*ConsulInstance, error)
type ConsulInstance ¶
type ConsulInstance struct {
// contains filtered or unexported fields
}
func (*ConsulInstance) AddConfigFromStruct ¶
func (i *ConsulInstance) AddConfigFromStruct(svcId string, cfg interface{}) error
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
type DockerOptions ¶ added in v1.5.0
type DockerOptions struct {
// Extra volume arguments
Volumes []string
// Extra env arguments.
// see https://docs.docker.com/engine/reference/run/#env-environment-variables for more info
Env []string
}
Extra options for running in docker
type EnvoyBootstrapBuilder ¶ added in v1.6.0
type EnvoyBootstrapBuilder interface {
Build(ei *EnvoyInstance) string
}
type EnvoyFactory ¶
type EnvoyFactory struct {
// contains filtered or unexported fields
}
func NewEnvoyFactory ¶
func NewEnvoyFactory() (*EnvoyFactory, error)
func (*EnvoyFactory) MustEnvoyInstance ¶ added in v1.2.15
func (ef *EnvoyFactory) MustEnvoyInstance() *EnvoyInstance
func (*EnvoyFactory) NewEnvoyInstance ¶
func (ef *EnvoyFactory) NewEnvoyInstance() (*EnvoyInstance, error)
type EnvoyInstance ¶
type EnvoyInstance struct {
AccessLogAddr string
AccessLogPort uint32
RatelimitAddr string
RatelimitPort uint32
ID string
Role string
UseDocker bool
GlooAddr string // address for gloo and services
Port uint32
RestXdsPort uint32
AdminPort uint32
// Envoy API Version to use, default to V3
ApiVersion string
DockerOptions
// contains filtered or unexported fields
}
func (*EnvoyInstance) DisablePanicMode ¶ added in v1.6.0
func (ei *EnvoyInstance) DisablePanicMode() error
func (*EnvoyInstance) EnablePanicMode ¶ added in v1.6.0
func (ei *EnvoyInstance) EnablePanicMode() error
func (*EnvoyInstance) EnvoyConfigDump ¶ added in v1.9.13
func (ei *EnvoyInstance) EnvoyConfigDump() (string, error)
func (*EnvoyInstance) RunWith ¶ added in v1.2.15
func (ei *EnvoyInstance) RunWith(eic EnvoyInstanceConfig) error
func (*EnvoyInstance) RunWithConfigFile ¶ added in v1.6.0
func (ei *EnvoyInstance) RunWithConfigFile(port int, configFile string) error
func (*EnvoyInstance) RunWithRole ¶
func (ei *EnvoyInstance) RunWithRole(role string, port int) error
func (*EnvoyInstance) RunWithRoleAndRestXds ¶ added in v1.6.7
func (ei *EnvoyInstance) RunWithRoleAndRestXds(role string, glooPort, restXdsPort int) error
type EnvoyInstanceConfig ¶ added in v1.2.15
type EnvoyInstanceConfig interface {
Role() string
Port() uint32
RestXdsPort() uint32
Context() context.Context
}
type NatsStreamingFactory ¶
type NatsStreamingFactory struct {
// contains filtered or unexported fields
}
func NewNatsStreamingFactory ¶
func NewNatsStreamingFactory() (*NatsStreamingFactory, error)
func (*NatsStreamingFactory) NewNatsStreamingInstance ¶
func (gf *NatsStreamingFactory) NewNatsStreamingInstance() (*NatsStreamingInstance, error)
type NatsStreamingInstance ¶
type NatsStreamingInstance struct {
// contains filtered or unexported fields
}
type PrometheusFactory ¶
type PrometheusFactory struct {
// contains filtered or unexported fields
}
func NewPrometheusFactory ¶
func NewPrometheusFactory() (*PrometheusFactory, error)
func (*PrometheusFactory) NewPrometheusInstance ¶
func (pf *PrometheusFactory) NewPrometheusInstance() *PrometheusInstance
type PrometheusInstance ¶
type PrometheusInstance struct {
Port int32
// contains filtered or unexported fields
}
type QuoteUnquoteMesh ¶
type QuoteUnquoteMesh struct {
Envoys []*EnvoyInstance
// contains filtered or unexported fields
}
func (*QuoteUnquoteMesh) AddFault ¶
func (m *QuoteUnquoteMesh) AddFault(svcIndex int, percent float32)
func (*QuoteUnquoteMesh) RemoveFault ¶
func (m *QuoteUnquoteMesh) RemoveFault(svcIndex int)
func (*QuoteUnquoteMesh) Start ¶
func (m *QuoteUnquoteMesh) Start(ef *EnvoyFactory, testClients TestClients, services []*Service)
func (*QuoteUnquoteMesh) UpdateSelfListener ¶
func (m *QuoteUnquoteMesh) UpdateSelfListener(svcIndex int, l *gloov1.Listener)
type RunOptions ¶
type RunOptions struct {
NsToWrite string
NsToWatch []string
WhatToRun What
GlooPort int32
ValidationPort int32
RestXdsPort int32
Settings *gloov1.Settings
Cache memory.InMemoryResourceCache
KubeClient kubernetes.Interface
ConsulClient consul.ConsulWatcher
ConsulDnsAddress string
}
type SafeBuffer ¶ added in v1.12.21
type SafeBuffer struct {
// contains filtered or unexported fields
}
SafeBuffer is a goroutine safe bytes.Buffer
type Service ¶
type Service struct {
Name string
Process string
// these will be filled by Start
Port uint32
MeshPort uint32
}
type StaticConfigs ¶
type StaticConfigs []*targetgroup.Group
type TestClients ¶
type TestClients struct {
GatewayClient gatewayv1.GatewayClient
HttpGatewayClient gatewayv1.MatchableHttpGatewayClient
VirtualServiceClient gatewayv1.VirtualServiceClient
ProxyClient gloov1.ProxyClient
UpstreamClient gloov1.UpstreamClient
SecretClient gloov1.SecretClient
ArtifactClient gloov1.ArtifactClient
ServiceClient skkube.ServiceClient
GlooPort int
RestXdsPort int
}
func RunGateway ¶
func RunGateway(ctx context.Context, justGloo bool) TestClients
func RunGlooGatewayUdsFds ¶
func RunGlooGatewayUdsFds(ctx context.Context, runOptions *RunOptions) TestClients
noinspection GoUnhandledErrorResult
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)
func (*VaultFactory) NewVaultInstance ¶
func (ef *VaultFactory) NewVaultInstance() (*VaultInstance, error)
type VaultFactoryConfig ¶ added in v1.9.25
type VaultFactoryConfig struct {
PathPrefix string
}
type VaultInstance ¶
type VaultInstance struct {
// contains filtered or unexported fields
}
func (*VaultInstance) EnableSecretEngine ¶ added in v1.9.25
func (i *VaultInstance) EnableSecretEngine(secretEngine string) error
func (*VaultInstance) RunWithAddress ¶ added in v1.9.25
func (i *VaultInstance) RunWithAddress(address string) error
Click to show internal directories.
Click to hide internal directories.