Documentation ¶
Index ¶
- Constants
- func GetEndpointNames(v *envoy_api_v2.Cluster) []string
- func GetRouteNames(v *envoy_api_v2.Listener) []string
- type Client
- func (c *Client) Clone() *Client
- func (c *Client) Close() error
- func (c *Client) Node() *envoy_api_v2_core.Node
- func (c *Client) Run(ctx context.Context) error
- func (c *Client) Send(req *envoy_api_v2.DiscoveryRequest) error
- func (c *Client) SendRsc(typeURL string, rsc []string) error
- func (c *Client) Start(ctx context.Context) error
- type Config
Constants ¶
View Source
const ( ClusterType = resource.ClusterType EndpointType = resource.EndpointType ListenerType = resource.ListenerType RouteType = resource.RouteType SecretType = resource.SecretType RuntimeType = resource.RuntimeType AnyType = resource.AnyType )
Variables ¶
This section is empty.
Functions ¶
func GetEndpointNames ¶
func GetEndpointNames(v *envoy_api_v2.Cluster) []string
GetEndpointNames returns the EDS names for CDS
func GetRouteNames ¶
func GetRouteNames(v *envoy_api_v2.Listener) []string
GetRouteNames returns the RDS names for LDS
Types ¶
type Client ¶
type Client struct { Config // contains filtered or unexported fields }
Client implements a client for xDS.
func NewClient ¶
NewClient connects to a xDS server, with optional TLS authentication if a cert dir is specified.
func (*Client) Node ¶
func (c *Client) Node() *envoy_api_v2_core.Node
func (*Client) Send ¶
func (c *Client) Send(req *envoy_api_v2.DiscoveryRequest) error
type Config ¶
type Config struct { utils.NodeConfig OnConnect func(cli *Client) error ContextDialer func(ctx context.Context, address string) (net.Conn, error) HandleCDS func(cli *Client, clusters []*envoy_api_v2.Cluster) HandleEDS func(cli *Client, endpoints []*envoy_api_v2.ClusterLoadAssignment) HandleLDS func(cli *Client, listeners []*envoy_api_v2.Listener) HandleRDS func(cli *Client, routes []*envoy_api_v2.RouteConfiguration) HandleSDS func(cli *Client, secrets []*envoy_api_v2_auth.Secret) HandleNotFound func(cli *Client, others []*any.Any) }
Config for the Client connection.
Click to show internal directories.
Click to hide internal directories.