Documentation ¶
Index ¶
Constants ¶
View Source
const ( ReasonAck = "ack" ReasonRequest = "request" ReasonInit = "init" )
Variables ¶
View Source
var ErrTimeout = errors.New("timeout")
ErrTimeout is returned by Wait if no update is received in the given time.
Functions ¶
This section is empty.
Types ¶
type ADSC ¶
type ADSC struct { GrpcOpts []grpc.DialOption InitialLoad bool // Metadata has the node metadata to send to pilot. // If nil, the defaults will be used. Metadata map[string]interface{} Config *Config // Responses we received last Responses Responses // Updates includes the type of the last update received from the server. Updates chan 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 DialContext ¶
Dial connects to a ADS server, with optional MTLS authentication if a cert dir is specified.
func (*ADSC) Fetch ¶
Fetch waits for the basic responses - CDS, EDS, RDS, LDS. Watch() must be called before.
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]interface{} XDSHeaders 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 // Context used for early cancellation Context context.Context GrpcOpts []grpc.DialOption NodeId string Locality string }
Config for the ADS connection.
type ResourceKey ¶
func (ResourceKey) String ¶
func (k ResourceKey) String() string
type ResourceNode ¶
type ResourceNode struct { Key ResourceKey Parents map[*ResourceNode]struct{} Children map[*ResourceNode]struct{} }
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.