nodes

package
v0.0.0-...-4b4864e Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTP            = "HTTP"
	HeaderMethod    = ":method"
	HeaderAuthority = ":authority"
	HeaderScheme    = ":scheme"
	TLS             = "TLS"
	HTTPS           = "HTTPS"
	TCP             = "TCP"
)

Variables

View Source
var (
	VirtualService = GraphSchema{
		Type:              "virtual-service",
		GetParentGateways: VSToGateway,
	}
	Gateway = GraphSchema{
		Type:              "gateway",
		GetParentGateways: DetectGatewayChanges,
	}
	Service = GraphSchema{
		Type:              "Service",
		GetParentGateways: SvcToGateway,
	}
	Endpoint = GraphSchema{
		Type:              "Endpoints",
		GetParentGateways: EPToGateway,
	}
	DestinationRule = GraphSchema{
		Type:              "destination-rule",
		GetParentGateways: DRToGateway,
	}
	Secret = GraphSchema{
		Type:              "Secrets",
		GetParentGateways: SecretToGateway,
	}
	SupportedGraphTypes = GraphDescriptor{
		VirtualService,
		Gateway,
		Service,
		Endpoint,
		DestinationRule,
		Secret,
	}
)

Functions

func BuildAviGraph

func BuildAviGraph(gws []string)

func DRToGateway

func DRToGateway(drName string, namespace string) ([]string, bool)

func DequeueIngestion

func DequeueIngestion(key string)

func DetectGatewayChanges

func DetectGatewayChanges(gwName string, namespace string) ([]string, bool)

func EPToGateway

func EPToGateway(epName string, namespace string) ([]string, bool)

func GetGatewayNamespace

func GetGatewayNamespace(namespace string, gateway string) string

func SecretToGateway

func SecretToGateway(secretName string, namespace string) ([]string, bool)

func SvcToGateway

func SvcToGateway(svcName string, namespace string) ([]string, bool)

func VSToGateway

func VSToGateway(vsName string, namespace string) ([]string, bool)

Types

type AviHostPathPortPoolPG

type AviHostPathPortPoolPG struct {
	Host          []string
	Path          []string
	Port          uint32
	Pool          string
	PoolGroup     string
	MatchCriteria string
}

type AviHttpPolicySetNode

type AviHttpPolicySetNode struct {
	Name             string
	Tenant           string
	CloudConfigCksum uint32
	HppMap           []AviHostPathPortPoolPG
	RedirectPorts    []AviRedirectPort
}

func (*AviHttpPolicySetNode) CalculateCheckSum

func (v *AviHttpPolicySetNode) CalculateCheckSum()

func (*AviHttpPolicySetNode) GetCheckSum

func (v *AviHttpPolicySetNode) GetCheckSum() uint32

type AviModelNode

type AviModelNode interface {
	//Each AVIModelNode represents a AVI API object.
	GetCheckSum() uint32
	CalculateCheckSum()
}

type AviObjectGraph

type AviObjectGraph struct {
	Name          string
	GraphChecksum uint32
	// contains filtered or unexported fields
}

func NewAviObjectGraph

func NewAviObjectGraph() *AviObjectGraph

func (*AviObjectGraph) AddModelNode

func (o *AviObjectGraph) AddModelNode(node AviModelNode)

func (*AviObjectGraph) BuildAviObjectGraph

func (o *AviObjectGraph) BuildAviObjectGraph(namespace string, gatewayNs string, gatewayName string, gwObj *istio_objs.IstioObject)

func (*AviObjectGraph) BuildIstioMutualSecret

func (o *AviObjectGraph) BuildIstioMutualSecret(namespace string, secretName string)

func (*AviObjectGraph) ConstructAviHTTPPGPoolNodes

func (o *AviObjectGraph) ConstructAviHTTPPGPoolNodes(vs *istio_objs.IstioObject, model_name string, AviVsName string, gatewayNs string, vsNode AviModelNode, isSniNode bool) []*AviPoolGroupNode

func (*AviObjectGraph) ConstructAviHttpPolicyNodes

func (o *AviObjectGraph) ConstructAviHttpPolicyNodes(gatewayNs string, vsObj *istio_objs.IstioObject, pgNodes []*AviPoolGroupNode, portHostProto AviPortHostProtocol, isSniNode bool) *AviHttpPolicySetNode

func (*AviObjectGraph) ConstructAviTCPPGPoolNodes

func (o *AviObjectGraph) ConstructAviTCPPGPoolNodes(vs *istio_objs.IstioObject, model_name string, AviVsName string, gatewayNs string, vsNode *AviVsNode, filterPort int32)

func (*AviObjectGraph) ConstructAviVsNode

func (o *AviObjectGraph) ConstructAviVsNode(gwObj *istio_objs.IstioObject) *AviVsNode

func (*AviObjectGraph) ConstructHTTPRedirectPolicies

func (o *AviObjectGraph) ConstructHTTPRedirectPolicies(vsport int32, redirPortToHost map[int32][]string, gatewayNs string, gatewayName string, vsNode *AviVsNode)

func (*AviObjectGraph) ConstructTLSPassthroughPGs

func (o *AviObjectGraph) ConstructTLSPassthroughPGs(vsObj *networking.VirtualService, gatewayNs string, vsNode *AviVsNode)

func (*AviObjectGraph) CreatePortClassifiedObjects

func (o *AviObjectGraph) CreatePortClassifiedObjects(vsNode *AviVsNode, namespace string, gatewayNs string, gatewayName string, gwObj *istio_objs.IstioObject)

func (*AviObjectGraph) GetAviHttpPolicies

func (o *AviObjectGraph) GetAviHttpPolicies() []*AviHttpPolicySetNode

func (*AviObjectGraph) GetAviPoolGroups

func (o *AviObjectGraph) GetAviPoolGroups() []*AviPoolGroupNode

func (*AviObjectGraph) GetAviPools

func (o *AviObjectGraph) GetAviPools() []*AviPoolNode

func (*AviObjectGraph) GetAviSNIVS

func (o *AviObjectGraph) GetAviSNIVS() []*AviVsTLSNode

func (*AviObjectGraph) GetAviSSLCertKeys

func (o *AviObjectGraph) GetAviSSLCertKeys() []*AviTLSKeyCertNode

func (*AviObjectGraph) GetAviVS

func (o *AviObjectGraph) GetAviVS() []*AviVsNode

func (*AviObjectGraph) GetCheckSum

func (v *AviObjectGraph) GetCheckSum() uint32

func (*AviObjectGraph) GetOrderedNodes

func (o *AviObjectGraph) GetOrderedNodes() []AviModelNode

func (*AviObjectGraph) ProcessDRs

func (o *AviObjectGraph) ProcessDRs(drList []string, poolNode *AviPoolNode, namespace string, subset string) map[string]string

type AviObjectGraphIntf

type AviObjectGraphIntf interface {
	GetOrderedNodes() []AviModelNode
}

type AviPoolGroupNode

type AviPoolGroupNode struct {
	Name             string
	Tenant           string
	ServiceMetadata  ServiceMetadataObj
	CloudConfigCksum uint32
	RuleChecksum     uint32
	Members          []*avimodels.PoolGroupMember
	MatchList        []MatchCriteria
	Port             string
}

func (*AviPoolGroupNode) CalculateCheckSum

func (v *AviPoolGroupNode) CalculateCheckSum()

func (*AviPoolGroupNode) GetCheckSum

func (v *AviPoolGroupNode) GetCheckSum() uint32

type AviPoolMetaServer

type AviPoolMetaServer struct {
	Ip         avimodels.IPAddr
	ServerNode string
}

type AviPoolNode

type AviPoolNode struct {
	Name             string
	Tenant           string
	ServiceMetadata  ServiceMetadataObj
	CloudConfigCksum uint32
	Port             int32
	PortName         string
	Servers          []AviPoolMetaServer
	Protocol         string
	LbAlgorithm      string
	ServerClientCert string
	PkiProfile       string
	SSLProfileRef    string
}

func (*AviPoolNode) CalculateCheckSum

func (v *AviPoolNode) CalculateCheckSum()

func (*AviPoolNode) GetCheckSum

func (v *AviPoolNode) GetCheckSum() uint32

type AviPortHostProtocol

type AviPortHostProtocol struct {
	PortMap     map[string][]int32
	Port        int32
	Protocol    string
	Hosts       []string
	Secret      string
	Passthrough bool
	Redirect    bool
}

type AviPortStrProtocol

type AviPortStrProtocol struct {
	Port     string // Can be Port name or int32 string
	Protocol string
}

type AviRedirectPort

type AviRedirectPort struct {
	Hosts        []string
	RedirectPort int32
	StatusCode   string
	VsPort       int32
}

type AviTLSKeyCertNode

type AviTLSKeyCertNode struct {
	Name             string
	Tenant           string
	CloudConfigCksum uint32
	Key              []byte
	Cert             []byte
	Port             int32
	CaCert           []byte
}

func (*AviTLSKeyCertNode) CalculateCheckSum

func (v *AviTLSKeyCertNode) CalculateCheckSum()

func (*AviTLSKeyCertNode) GetCheckSum

func (v *AviTLSKeyCertNode) GetCheckSum() uint32

type AviVsNode

type AviVsNode struct {
	Name               string
	Tenant             string
	ServiceMetadata    ServiceMetadataObj
	ApplicationProfile string
	NetworkProfile     string
	PortProto          []AviPortHostProtocol // for listeners
	DefaultPool        string
	EastWest           bool
	CloudConfigCksum   uint32
	DefaultPoolGroup   string
	// This field will detect if the HTTP policy set rules have changed.
	HTTPChecksum     uint32
	SNIParent        bool
	HttpPoolRefs     []*AviHttpPolicySetNode
	PoolGroupRefs    []*AviPoolGroupNode
	PoolRefs         []*AviPoolNode
	SSLKeyCertRefs   []*AviTLSKeyCertNode
	TCPPoolGroupRefs []*AviPoolGroupNode
}

func (*AviVsNode) CalculateCheckSum

func (v *AviVsNode) CalculateCheckSum()

func (*AviVsNode) GetCheckSum

func (v *AviVsNode) GetCheckSum() uint32

type AviVsTLSNode

type AviVsTLSNode struct {
	VHParentName     string
	VHDomainNames    []string
	CloudConfigCksum uint32
	Name             string
	TLSKeyCert       []*AviTLSKeyCertNode
	DefaultPool      string
	TLSType          string
	Tenant           string
	HttpPoolRefs     []*AviHttpPolicySetNode
	PoolGroupRefs    []*AviPoolGroupNode
	PoolRefs         []*AviPoolNode
	SSLKeyCertRefs   []*AviTLSKeyCertNode
	*AviVsNode
}

func (*AviVsTLSNode) CalculateCheckSum

func (v *AviVsTLSNode) CalculateCheckSum()

func (*AviVsTLSNode) GetCheckSum

func (v *AviVsTLSNode) GetCheckSum() uint32

type GraphDescriptor

type GraphDescriptor []GraphSchema

func ConfigDescriptor

func ConfigDescriptor() GraphDescriptor

func (GraphDescriptor) GetByType

func (descriptor GraphDescriptor) GetByType(name string) (GraphSchema, bool)

type GraphSchema

type GraphSchema struct {
	Type              string
	GetParentGateways func(string, string) ([]string, bool)
	UpdateRels        func(string, string) bool
}

type MatchCriteria

type MatchCriteria struct {
	Name          string
	Criteria      string
	PathSpecifier isRouteMatch_PathSpecifier
}

func (*MatchCriteria) GetPath

func (m *MatchCriteria) GetPath() string

func (*MatchCriteria) GetPathSpecifier

func (m *MatchCriteria) GetPathSpecifier() isRouteMatch_PathSpecifier

func (*MatchCriteria) GetPrefix

func (m *MatchCriteria) GetPrefix() string

func (*MatchCriteria) GetRegex

func (m *MatchCriteria) GetRegex() string

type RouteMatch_Path

type RouteMatch_Path struct {
	Path string
}

type RouteMatch_Prefix

type RouteMatch_Prefix struct {
	Prefix string
}

type RouteMatch_Regex

type RouteMatch_Regex struct {
	Regex string
}

type ServiceMetadataObj

type ServiceMetadataObj struct {
	CrudHashKey string `json:"crud_hash_key"`
}

Jump to

Keyboard shortcuts

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