resource

package
v0.20.4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: Apache-2.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

View Source
const (
	AnyType    = ""
	TypePrefix = "type.googleapis.com"
)

AnyType is used only by ADS

View Source
const (
	EndpointTypeV3 = TypePrefix + "/envoy.config.endpoint.v3.ClusterLoadAssignment"
	ClusterTypeV3  = TypePrefix + "/envoy.config.cluster.v3.Cluster"
	RouteTypeV3    = TypePrefix + "/envoy.config.route.v3.RouteConfiguration"
	ListenerTypeV3 = TypePrefix + "/envoy.config.listener.v3.Listener"
	SecretTypeV3   = TypePrefix + "/envoy.extensions.transport_sockets.tls.v3.Secret"
)

Resource types in xDS v3.

View Source
const (
	FetchEndpointsV3 = "/v3/discovery:endpoints"
	FetchClustersV3  = "/v3/discovery:clusters"
	FetchListenersV3 = "/v3/discovery:listeners"
	FetchRoutesV3    = "/v3/discovery:routes"
	FetchSecretsV3   = "/v3/discovery:secrets"
)

Fetch urls in xDS v3.

View Source
const DefaultAPIVersion = envoy_config_core_v3.ApiVersion_V3

DefaultAPIVersion is the api version

Variables

View Source
var (
	// ResponseTypes are supported response types.
	ResponseTypes = []string{
		EndpointTypeV3,
		ClusterTypeV3,
		RouteTypeV3,
		ListenerTypeV3,
	}
)

Functions

func GetResourceName

func GetResourceName(res cache.ResourceProto) string

GetResourceName returns the resource name for a valid xDS response type.

func GetResourceReferences

func GetResourceReferences(resources map[string]cache.Resource) map[string]bool

GetResourceReferences returns the names for dependent resources (EDS cluster names for CDS, RDS routes names for LDS).

Types

type EnvoyResource

type EnvoyResource struct {
	ProtoMessage cache.ResourceProto
}

func NewEnvoyResource

func NewEnvoyResource(r cache.ResourceProto) *EnvoyResource

func (*EnvoyResource) Name

func (e *EnvoyResource) Name() string

GetResourceName returns the resource name for a valid xDS response type.

func (*EnvoyResource) References

func (e *EnvoyResource) References() []cache.XdsResourceReference

func (*EnvoyResource) ResourceProto

func (e *EnvoyResource) ResourceProto() cache.ResourceProto

func (*EnvoyResource) Self

func (*EnvoyResource) Type

func (e *EnvoyResource) Type() string

Jump to

Keyboard shortcuts

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