Documentation ¶
Index ¶
- Variables
- type ADSC
- func (a *ADSC) Close()
- func (a *ADSC) EndpointsJSON() string
- func (a *ADSC) Run() error
- func (a *ADSC) Save(base string) error
- func (a *ADSC) Send(req *xdsapi.DiscoveryRequest) error
- func (a *ADSC) Wait(update string, to time.Duration) (string, error)
- func (a *ADSC) WaitClear()
- func (a *ADSC) Watch()
- type Config
- type Endpoint
- type TCPListener
- type Target
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTimeout is returned by Wait if no update is received in the given time. ErrTimeout = errors.New("timeout") )
Functions ¶
This section is empty.
Types ¶
type ADSC ¶
type ADSC struct { // InitialLoad tracks the time to receive the initial configuration. InitialLoad time.Duration // HTTPListeners contains received listeners with a http_connection_manager filter. HTTPListeners map[string]*xdsapi.Listener // TCPListeners contains all listeners of type TCP (not-HTTP) TCPListeners map[string]*xdsapi.Listener // All received clusters of type EDS, keyed by name EDSClusters map[string]*xdsapi.Cluster // All received clusters of no-EDS type, keyed by name Clusters map[string]*xdsapi.Cluster // All received routes, keyed by route name Routes map[string]*xdsapi.RouteConfiguration // All received endpoints, keyed by cluster name EDS map[string]*xdsapi.ClusterLoadAssignment // DumpCfg will print all received config DumpCfg bool // Metadata has the node metadata to send to pilot. // If nil, the defaults will be used. Metadata map[string]string // Updates includes the type of the last update received from the server. Updates chan string VersionInfo map[string]string // contains filtered or unexported fields }
ADSC implements a basic client for ADS, for use in stress tests and tools or libraries that need to connect to Istio pilot or other ADS servers.
func Dial ¶
Dial connects to a ADS server, with optional MTLS authentication if a cert dir is specified.
func (*ADSC) EndpointsJSON ¶
EndpointsJSON returns the endpoints, formatted as JSON, for debugging.
func (*ADSC) Wait ¶
Wait for an update of the specified type. If type is empty, wait for next update.
type Config ¶
type Config struct { // Namespace defaults to 'default' Namespace string // Workload defaults to 'test' Workload string // Meta includes additional metadata for the node Meta map[string]string // NodeType defaults to sidecar. "ingress" and "router" are also supported. NodeType string // IP is currently the primary key used to locate inbound configs. It is sent by client, // must match a known endpoint IP. Tests can use a ServiceEntry to register fake IPs. IP string }
Config for the ADS connection.
type TCPListener ¶
type TCPListener struct { // Address is the address, as expected by go Dial and Listen, including port Address string // LogFile is the access log address for the listener LogFile string // Target is the destination cluster. Target string }
TCPListener extracts the core elements from envoy Listener.
Click to show internal directories.
Click to hide internal directories.