mesh

package
v0.0.0-...-d86545f Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

nolint:whitespace

Index

Constants

View Source
const (
	ProtocolUnknown = "<unknown>"
	ProtocolTCP     = "tcp"
	ProtocolHTTP    = "http"
	ProtocolHTTP2   = "http2"
	ProtocolGRPC    = "grpc"
	ProtocolKafka   = "kafka"
	ProtocolTriple  = "triple"
)
View Source
const (
	AffinityRouteType model.ResourceType = "AffinityRoute"
)
View Source
const (
	ConditionRouteType model.ResourceType = "ConditionRoute"
)
View Source
const (
	DataplaneInsightType model.ResourceType = "DataplaneInsight"
)
View Source
const (
	DataplaneType model.ResourceType = "Dataplane"
)
View Source
const (
	DynamicConfigType model.ResourceType = "DynamicConfig"
)
View Source
const (
	MappingType model.ResourceType = "Mapping"
)
View Source
const (
	MeshInsightType model.ResourceType = "MeshInsight"
)
View Source
const (
	MeshType model.ResourceType = "Mesh"
)
View Source
const (
	MetaDataType model.ResourceType = "MetaData"
)
View Source
const PassThroughService = "pass_through"

Service that indicates L4 pass through cluster

View Source
const (
	TagRouteType model.ResourceType = "TagRoute"
)
View Source
const (
	ZoneEgressInsightType model.ResourceType = "ZoneEgressInsight"
)
View Source
const (
	ZoneEgressType model.ResourceType = "ZoneEgress"
)
View Source
const (
	ZoneIngressInsightType model.ResourceType = "ZoneIngressInsight"
)
View Source
const (
	ZoneIngressType model.ResourceType = "ZoneIngress"
)

Variables

View Source
var (
	IPv4Loopback = net.IPv4(127, 0, 0, 1)
	IPv6Loopback = net.IPv6loopback
)
View Source
var AffinityRouteResourceTypeDescriptor = model.ResourceTypeDescriptor{
	Name:                AffinityRouteType,
	Resource:            NewAffinityRouteResource(),
	ResourceList:        &AffinityRouteResourceList{},
	ReadOnly:            false,
	AdminOnly:           false,
	Scope:               model.ScopeMesh,
	DDSFlags:            model.GlobalToAllZonesFlag,
	WsPath:              "affinityroutes",
	DubboctlArg:         "affinityroute",
	DubboctlListArg:     "affinityroutes",
	AllowToInspect:      true,
	IsPolicy:            true,
	SingularDisplayName: "Affinity Route",
	PluralDisplayName:   "Affinity Routes",
	IsExperimental:      false,
}
View Source
var ConditionRouteResourceTypeDescriptor = model.ResourceTypeDescriptor{
	Name:                ConditionRouteType,
	Resource:            NewConditionRouteResource(),
	ResourceList:        &ConditionRouteResourceList{},
	ReadOnly:            false,
	AdminOnly:           false,
	Scope:               model.ScopeMesh,
	DDSFlags:            model.GlobalToAllZonesFlag,
	WsPath:              "conditionroutes",
	DubboctlArg:         "conditionroute",
	DubboctlListArg:     "conditionroutes",
	AllowToInspect:      true,
	IsPolicy:            true,
	SingularDisplayName: "Condition Route",
	PluralDisplayName:   "Condition Routes",
	IsExperimental:      false,
}
View Source
var DataplaneInsightResourceTypeDescriptor = model.ResourceTypeDescriptor{
	Name:                DataplaneInsightType,
	Resource:            NewDataplaneInsightResource(),
	ResourceList:        &DataplaneInsightResourceList{},
	ReadOnly:            true,
	AdminOnly:           false,
	Scope:               model.ScopeMesh,
	DDSFlags:            model.ZoneToGlobalFlag,
	WsPath:              "dataplane-insights",
	DubboctlArg:         "",
	DubboctlListArg:     "",
	AllowToInspect:      false,
	IsPolicy:            false,
	SingularDisplayName: "Dataplane Insight",
	PluralDisplayName:   "Dataplane Insights",
	IsExperimental:      false,
}
View Source
var DataplaneResourceTypeDescriptor = model.ResourceTypeDescriptor{
	Name:                DataplaneType,
	Resource:            NewDataplaneResource(),
	ResourceList:        &DataplaneResourceList{},
	ReadOnly:            false,
	AdminOnly:           false,
	Scope:               model.ScopeMesh,
	DDSFlags:            model.ZoneToGlobalFlag,
	WsPath:              "dataplanes",
	DubboctlArg:         "dataplane",
	DubboctlListArg:     "dataplanes",
	AllowToInspect:      true,
	IsPolicy:            false,
	SingularDisplayName: "Dataplane",
	PluralDisplayName:   "Dataplanes",
	IsExperimental:      false,
}
View Source
var DynamicConfigResourceTypeDescriptor = model.ResourceTypeDescriptor{
	Name:                DynamicConfigType,
	Resource:            NewDynamicConfigResource(),
	ResourceList:        &DynamicConfigResourceList{},
	ReadOnly:            false,
	AdminOnly:           false,
	Scope:               model.ScopeMesh,
	DDSFlags:            model.GlobalToAllZonesFlag,
	WsPath:              "dynamicconfigs",
	DubboctlArg:         "dynamicconfig",
	DubboctlListArg:     "dynamicconfigs",
	AllowToInspect:      true,
	IsPolicy:            true,
	SingularDisplayName: "Dynamic Config",
	PluralDisplayName:   "Dynamic Configs",
	IsExperimental:      false,
}
View Source
var MappingResourceTypeDescriptor = model.ResourceTypeDescriptor{
	Name:                MappingType,
	Resource:            NewMappingResource(),
	ResourceList:        &MappingResourceList{},
	ReadOnly:            false,
	AdminOnly:           false,
	Scope:               model.ScopeMesh,
	DDSFlags:            model.ZoneToGlobalFlag | model.GlobalToAllButOriginalZoneFlag,
	WsPath:              "mappings",
	DubboctlArg:         "mapping",
	DubboctlListArg:     "mappings",
	AllowToInspect:      true,
	IsPolicy:            true,
	SingularDisplayName: "Mapping",
	PluralDisplayName:   "Mappings",
	IsExperimental:      false,
}
View Source
var MeshInsightResourceTypeDescriptor = model.ResourceTypeDescriptor{
	Name:                MeshInsightType,
	Resource:            NewMeshInsightResource(),
	ResourceList:        &MeshInsightResourceList{},
	ReadOnly:            true,
	AdminOnly:           false,
	Scope:               model.ScopeGlobal,
	WsPath:              "mesh-insights",
	DubboctlArg:         "",
	DubboctlListArg:     "",
	AllowToInspect:      false,
	IsPolicy:            false,
	SingularDisplayName: "Mesh Insight",
	PluralDisplayName:   "Mesh Insights",
	IsExperimental:      false,
}
View Source
var MeshResourceTypeDescriptor = model.ResourceTypeDescriptor{
	Name:                MeshType,
	Resource:            NewMeshResource(),
	ResourceList:        &MeshResourceList{},
	ReadOnly:            false,
	AdminOnly:           false,
	Scope:               model.ScopeGlobal,
	DDSFlags:            model.GlobalToAllZonesFlag,
	WsPath:              "meshes",
	DubboctlArg:         "mesh",
	DubboctlListArg:     "meshes",
	AllowToInspect:      true,
	IsPolicy:            false,
	SingularDisplayName: "Mesh",
	PluralDisplayName:   "Meshes",
	IsExperimental:      false,
}
View Source
var MetaDataResourceTypeDescriptor = model.ResourceTypeDescriptor{
	Name:                MetaDataType,
	Resource:            NewMetaDataResource(),
	ResourceList:        &MetaDataResourceList{},
	ReadOnly:            false,
	AdminOnly:           false,
	Scope:               model.ScopeMesh,
	DDSFlags:            model.ZoneToGlobalFlag,
	WsPath:              "metadatas",
	DubboctlArg:         "metadata",
	DubboctlListArg:     "metadatas",
	AllowToInspect:      true,
	IsPolicy:            true,
	SingularDisplayName: "Meta Data",
	PluralDisplayName:   "Meta Datas",
	IsExperimental:      false,
}
View Source
var OnlyServiceTagAllowed = ValidateSelectorsOpts{
	RequireAtLeastOneSelector: true,
	ValidateTagsOpts: ValidateTagsOpts{
		RequireService: true,
		ExtraTagsValidators: []TagsValidatorFunc{
			func(path validators.PathBuilder, selector map[string]string) validators.ValidationError {
				var err validators.ValidationError
				_, defined := selector[mesh_proto.ServiceTag]
				if len(selector) != 1 || !defined {
					err.AddViolationAt(path, fmt.Sprintf("must consist of exactly one tag %q", mesh_proto.ServiceTag))
				}
				return err
			},
		},
		ExtraTagKeyValidators: []TagKeyValidatorFunc{
			func(path validators.PathBuilder, key string) validators.ValidationError {
				var err validators.ValidationError
				if key != mesh_proto.ServiceTag {
					err.AddViolationAt(path.Key(key), fmt.Sprintf("tag %q is not allowed", key))
				}
				return err
			},
		},
	},
}

SupportedProtocols is a list of supported protocols that will be communicated to a user.

View Source
var TagRouteResourceTypeDescriptor = model.ResourceTypeDescriptor{
	Name:                TagRouteType,
	Resource:            NewTagRouteResource(),
	ResourceList:        &TagRouteResourceList{},
	ReadOnly:            false,
	AdminOnly:           false,
	Scope:               model.ScopeMesh,
	DDSFlags:            model.GlobalToAllZonesFlag,
	WsPath:              "tagroutes",
	DubboctlArg:         "tagroute",
	DubboctlListArg:     "tagroutes",
	AllowToInspect:      true,
	IsPolicy:            true,
	SingularDisplayName: "Tag Route",
	PluralDisplayName:   "Tag Routes",
	IsExperimental:      false,
}
View Source
var ZoneEgressInsightResourceTypeDescriptor = model.ResourceTypeDescriptor{
	Name:                ZoneEgressInsightType,
	Resource:            NewZoneEgressInsightResource(),
	ResourceList:        &ZoneEgressInsightResourceList{},
	ReadOnly:            true,
	AdminOnly:           false,
	Scope:               model.ScopeGlobal,
	DDSFlags:            model.ZoneToGlobalFlag,
	WsPath:              "zoneegressinsights",
	DubboctlArg:         "",
	DubboctlListArg:     "",
	AllowToInspect:      false,
	IsPolicy:            false,
	SingularDisplayName: "Zone Egress Insight",
	PluralDisplayName:   "Zone Egress Insights",
	IsExperimental:      false,
}
View Source
var ZoneEgressResourceTypeDescriptor = model.ResourceTypeDescriptor{
	Name:                ZoneEgressType,
	Resource:            NewZoneEgressResource(),
	ResourceList:        &ZoneEgressResourceList{},
	ReadOnly:            false,
	AdminOnly:           false,
	Scope:               model.ScopeGlobal,
	DDSFlags:            model.ZoneToGlobalFlag | model.GlobalToAllButOriginalZoneFlag,
	WsPath:              "zoneegresses",
	DubboctlArg:         "zoneegress",
	DubboctlListArg:     "zoneegresses",
	AllowToInspect:      true,
	IsPolicy:            false,
	SingularDisplayName: "Zone Egress",
	PluralDisplayName:   "Zone Egresses",
	IsExperimental:      false,
}
View Source
var ZoneIngressInsightResourceTypeDescriptor = model.ResourceTypeDescriptor{
	Name:                ZoneIngressInsightType,
	Resource:            NewZoneIngressInsightResource(),
	ResourceList:        &ZoneIngressInsightResourceList{},
	ReadOnly:            true,
	AdminOnly:           false,
	Scope:               model.ScopeGlobal,
	DDSFlags:            model.ZoneToGlobalFlag,
	WsPath:              "zone-ingress-insights",
	DubboctlArg:         "",
	DubboctlListArg:     "",
	AllowToInspect:      false,
	IsPolicy:            false,
	SingularDisplayName: "Zone Ingress Insight",
	PluralDisplayName:   "Zone Ingress Insights",
	IsExperimental:      false,
}
View Source
var ZoneIngressResourceTypeDescriptor = model.ResourceTypeDescriptor{
	Name:                ZoneIngressType,
	Resource:            NewZoneIngressResource(),
	ResourceList:        &ZoneIngressResourceList{},
	ReadOnly:            false,
	AdminOnly:           false,
	Scope:               model.ScopeGlobal,
	DDSFlags:            model.ZoneToGlobalFlag | model.GlobalToAllButOriginalZoneFlag,
	WsPath:              "zoneingresses",
	DubboctlArg:         "zoneingress",
	DubboctlListArg:     "zoneingresses",
	AllowToInspect:      true,
	IsPolicy:            false,
	SingularDisplayName: "Zone Ingress",
	PluralDisplayName:   "Zone Ingresses",
	IsExperimental:      false,
}

Functions

func AllowedValuesHint

func AllowedValuesHint(values ...string) string

func Keys

func Keys(tags map[string]string) []string

func ParseDuration

func ParseDuration(durationStr string) (time.Duration, error)

ParseDuration parses a string into a time.Duration

func ValidateAnyResourceYAML

func ValidateAnyResourceYAML(resYAML string, msgs ...proto.Message) error

Resource is considered valid if it pass validation of any message

func ValidateAnyResourceYAMLPatch

func ValidateAnyResourceYAMLPatch(resYAML string, msgs ...proto.Message) error

Resource is considered valid if it pass validation of any message

func ValidateHostname

func ValidateHostname(path validators.PathBuilder, hostname string) validators.ValidationError

ValidateHostname validates a gateway hostname field. A hostname may be one of

  • '*'
  • '*.domain.name'
  • 'domain.name'

func ValidateMesh

func ValidateMesh(mesh string, scope core_model.ResourceScope) validators.ValidationError

ValidateMesh checks that resource's mesh matches the old regex (with '_'). Even if user creates entirely new resource, we can't check resource's mesh against the new regex, because Mesh resource itself can be old and contain '_' in its name. All new Mesh resources will have their name validated against new regex.

func ValidatePort

func ValidatePort(path validators.PathBuilder, port uint32) validators.ValidationError

ValidatePort validates that port is a valid TCP or UDP port number.

func ValidateResourceYAML

func ValidateResourceYAML(msg proto.Message, resYAML string) error

func ValidateResourceYAMLPatch

func ValidateResourceYAMLPatch(msg proto.Message, resYAML string) error

func ValidateThreshold

func ValidateThreshold(path validators.PathBuilder, threshold uint32) validators.ValidationError

Types

type AffinityRouteResource

type AffinityRouteResource struct {
	Meta model.ResourceMeta
	Spec *mesh_proto.AffinityRoute
}

func NewAffinityRouteResource

func NewAffinityRouteResource() *AffinityRouteResource

func (*AffinityRouteResource) Descriptor

func (*AffinityRouteResource) GetMeta

func (*AffinityRouteResource) GetSpec

func (*AffinityRouteResource) SetMeta

func (*AffinityRouteResource) SetSpec

func (t *AffinityRouteResource) SetSpec(spec model.ResourceSpec) error

type AffinityRouteResourceList

type AffinityRouteResourceList struct {
	Items      []*AffinityRouteResource
	Pagination model.Pagination
}

func (*AffinityRouteResourceList) AddItem

func (*AffinityRouteResourceList) GetItemType

func (l *AffinityRouteResourceList) GetItemType() model.ResourceType

func (*AffinityRouteResourceList) GetItems

func (l *AffinityRouteResourceList) GetItems() []model.Resource

func (*AffinityRouteResourceList) GetPagination

func (l *AffinityRouteResourceList) GetPagination() *model.Pagination

func (*AffinityRouteResourceList) NewItem

func (*AffinityRouteResourceList) SetPagination

func (l *AffinityRouteResourceList) SetPagination(p model.Pagination)

type ConditionRouteResource

type ConditionRouteResource struct {
	Meta model.ResourceMeta
	Spec *mesh_proto.ConditionRoute
}

func NewConditionRouteResource

func NewConditionRouteResource() *ConditionRouteResource

func (*ConditionRouteResource) Descriptor

func (*ConditionRouteResource) GetMeta

func (*ConditionRouteResource) GetSpec

func (*ConditionRouteResource) SetMeta

func (*ConditionRouteResource) SetSpec

type ConditionRouteResourceList

type ConditionRouteResourceList struct {
	Items      []*ConditionRouteResource
	Pagination model.Pagination
}

func (*ConditionRouteResourceList) AddItem

func (*ConditionRouteResourceList) GetItemType

func (*ConditionRouteResourceList) GetItems

func (l *ConditionRouteResourceList) GetItems() []model.Resource

func (*ConditionRouteResourceList) GetPagination

func (l *ConditionRouteResourceList) GetPagination() *model.Pagination

func (*ConditionRouteResourceList) NewItem

func (*ConditionRouteResourceList) SetPagination

func (l *ConditionRouteResourceList) SetPagination(p model.Pagination)

type DataplaneInsightResource

type DataplaneInsightResource struct {
	Meta model.ResourceMeta
	Spec *mesh_proto.DataplaneInsight
}

func NewDataplaneInsightResource

func NewDataplaneInsightResource() *DataplaneInsightResource

func (*DataplaneInsightResource) Descriptor

func (*DataplaneInsightResource) GetMeta

func (*DataplaneInsightResource) GetSpec

func (*DataplaneInsightResource) SetMeta

func (*DataplaneInsightResource) SetSpec

type DataplaneInsightResourceList

type DataplaneInsightResourceList struct {
	Items      []*DataplaneInsightResource
	Pagination model.Pagination
}

func (*DataplaneInsightResourceList) AddItem

func (*DataplaneInsightResourceList) GetItemType

func (*DataplaneInsightResourceList) GetItems

func (*DataplaneInsightResourceList) GetPagination

func (l *DataplaneInsightResourceList) GetPagination() *model.Pagination

func (*DataplaneInsightResourceList) NewItem

func (*DataplaneInsightResourceList) SetPagination

func (l *DataplaneInsightResourceList) SetPagination(p model.Pagination)

type DataplaneResource

type DataplaneResource struct {
	Meta model.ResourceMeta
	Spec *mesh_proto.Dataplane
}

func NewDataplaneResource

func NewDataplaneResource() *DataplaneResource

func (*DataplaneResource) AdminAddress

func (d *DataplaneResource) AdminAddress(defaultAdminPort uint32) string

func (*DataplaneResource) AdminPort

func (d *DataplaneResource) AdminPort(defaultAdminPort uint32) uint32

func (*DataplaneResource) Descriptor

func (*DataplaneResource) GetIP

func (d *DataplaneResource) GetIP() string

func (*DataplaneResource) GetMeta

func (t *DataplaneResource) GetMeta() model.ResourceMeta

func (*DataplaneResource) GetSpec

func (t *DataplaneResource) GetSpec() model.ResourceSpec

func (*DataplaneResource) Hash

func (d *DataplaneResource) Hash() []byte

func (*DataplaneResource) IsIPv6

func (d *DataplaneResource) IsIPv6() bool

func (*DataplaneResource) SetMeta

func (t *DataplaneResource) SetMeta(m model.ResourceMeta)

func (*DataplaneResource) SetSpec

func (t *DataplaneResource) SetSpec(spec model.ResourceSpec) error

func (*DataplaneResource) UsesInboundInterface

func (d *DataplaneResource) UsesInboundInterface(address net.IP, port uint32) bool

func (*DataplaneResource) UsesInterface

func (d *DataplaneResource) UsesInterface(address net.IP, port uint32) bool

func (*DataplaneResource) UsesOutboundInterface

func (d *DataplaneResource) UsesOutboundInterface(address net.IP, port uint32) bool

func (*DataplaneResource) Validate

func (d *DataplaneResource) Validate() error

type DataplaneResourceList

type DataplaneResourceList struct {
	Items      []*DataplaneResource
	Pagination model.Pagination
}

func (*DataplaneResourceList) AddItem

func (l *DataplaneResourceList) AddItem(r model.Resource) error

func (*DataplaneResourceList) GetItemType

func (l *DataplaneResourceList) GetItemType() model.ResourceType

func (*DataplaneResourceList) GetItems

func (l *DataplaneResourceList) GetItems() []model.Resource

func (*DataplaneResourceList) GetPagination

func (l *DataplaneResourceList) GetPagination() *model.Pagination

func (*DataplaneResourceList) NewItem

func (l *DataplaneResourceList) NewItem() model.Resource

func (*DataplaneResourceList) SetPagination

func (l *DataplaneResourceList) SetPagination(p model.Pagination)

type DynamicConfigResource

type DynamicConfigResource struct {
	Meta model.ResourceMeta
	Spec *mesh_proto.DynamicConfig
}

func NewDynamicConfigResource

func NewDynamicConfigResource() *DynamicConfigResource

func (*DynamicConfigResource) Descriptor

func (*DynamicConfigResource) GetMeta

func (*DynamicConfigResource) GetSpec

func (*DynamicConfigResource) SetMeta

func (*DynamicConfigResource) SetSpec

func (t *DynamicConfigResource) SetSpec(spec model.ResourceSpec) error

type DynamicConfigResourceList

type DynamicConfigResourceList struct {
	Items      []*DynamicConfigResource
	Pagination model.Pagination
}

func (*DynamicConfigResourceList) AddItem

func (*DynamicConfigResourceList) GetItemType

func (l *DynamicConfigResourceList) GetItemType() model.ResourceType

func (*DynamicConfigResourceList) GetItems

func (l *DynamicConfigResourceList) GetItems() []model.Resource

func (*DynamicConfigResourceList) GetPagination

func (l *DynamicConfigResourceList) GetPagination() *model.Pagination

func (*DynamicConfigResourceList) NewItem

func (*DynamicConfigResourceList) SetPagination

func (l *DynamicConfigResourceList) SetPagination(p model.Pagination)

type MappingResource

type MappingResource struct {
	Meta model.ResourceMeta
	Spec *mesh_proto.Mapping
}

func NewMappingResource

func NewMappingResource() *MappingResource

func (*MappingResource) Descriptor

func (*MappingResource) GetMeta

func (t *MappingResource) GetMeta() model.ResourceMeta

func (*MappingResource) GetSpec

func (t *MappingResource) GetSpec() model.ResourceSpec

func (*MappingResource) IsRemoteMapping

func (t *MappingResource) IsRemoteMapping(localZone string) bool

func (*MappingResource) SetMeta

func (t *MappingResource) SetMeta(m model.ResourceMeta)

func (*MappingResource) SetSpec

func (t *MappingResource) SetSpec(spec model.ResourceSpec) error

type MappingResourceList

type MappingResourceList struct {
	Items      []*MappingResource
	Pagination model.Pagination
}

func (*MappingResourceList) AddItem

func (l *MappingResourceList) AddItem(r model.Resource) error

func (*MappingResourceList) GetItemType

func (l *MappingResourceList) GetItemType() model.ResourceType

func (*MappingResourceList) GetItems

func (l *MappingResourceList) GetItems() []model.Resource

func (*MappingResourceList) GetPagination

func (l *MappingResourceList) GetPagination() *model.Pagination

func (*MappingResourceList) NewItem

func (l *MappingResourceList) NewItem() model.Resource

func (*MappingResourceList) SetPagination

func (l *MappingResourceList) SetPagination(p model.Pagination)

type MeshInsightResource

type MeshInsightResource struct {
	Meta model.ResourceMeta
	Spec *mesh_proto.MeshInsight
}

func NewMeshInsightResource

func NewMeshInsightResource() *MeshInsightResource

func (*MeshInsightResource) Descriptor

func (*MeshInsightResource) GetMeta

func (t *MeshInsightResource) GetMeta() model.ResourceMeta

func (*MeshInsightResource) GetSpec

func (t *MeshInsightResource) GetSpec() model.ResourceSpec

func (*MeshInsightResource) SetMeta

func (t *MeshInsightResource) SetMeta(m model.ResourceMeta)

func (*MeshInsightResource) SetSpec

func (t *MeshInsightResource) SetSpec(spec model.ResourceSpec) error

type MeshInsightResourceList

type MeshInsightResourceList struct {
	Items      []*MeshInsightResource
	Pagination model.Pagination
}

func (*MeshInsightResourceList) AddItem

func (*MeshInsightResourceList) GetItemType

func (l *MeshInsightResourceList) GetItemType() model.ResourceType

func (*MeshInsightResourceList) GetItems

func (l *MeshInsightResourceList) GetItems() []model.Resource

func (*MeshInsightResourceList) GetPagination

func (l *MeshInsightResourceList) GetPagination() *model.Pagination

func (*MeshInsightResourceList) NewItem

func (l *MeshInsightResourceList) NewItem() model.Resource

func (*MeshInsightResourceList) SetPagination

func (l *MeshInsightResourceList) SetPagination(p model.Pagination)

type MeshResource

type MeshResource struct {
	Meta model.ResourceMeta
	Spec *mesh_proto.Mesh
}

func NewMeshResource

func NewMeshResource() *MeshResource

func (*MeshResource) Descriptor

func (t *MeshResource) Descriptor() model.ResourceTypeDescriptor

func (*MeshResource) GetCertificateAuthorityBackend

func (m *MeshResource) GetCertificateAuthorityBackend(name string) *mesh_proto.CertificateAuthorityBackend

func (*MeshResource) GetEnabledCertificateAuthorityBackend

func (m *MeshResource) GetEnabledCertificateAuthorityBackend() *mesh_proto.CertificateAuthorityBackend

func (*MeshResource) GetEnabledMetricsBackend

func (m *MeshResource) GetEnabledMetricsBackend() *mesh_proto.MetricsBackend

func (*MeshResource) GetLoggingBackend

func (m *MeshResource) GetLoggingBackend(name string) *mesh_proto.LoggingBackend

func (*MeshResource) GetLoggingBackends

func (m *MeshResource) GetLoggingBackends() string

GetLoggingBackends will return logging backends as comma separated strings if empty return empty string

func (*MeshResource) GetMeta

func (t *MeshResource) GetMeta() model.ResourceMeta

func (*MeshResource) GetMetricsBackend

func (m *MeshResource) GetMetricsBackend(name string) *mesh_proto.MetricsBackend

func (*MeshResource) GetSpec

func (t *MeshResource) GetSpec() model.ResourceSpec

func (*MeshResource) GetTracingBackend

func (m *MeshResource) GetTracingBackend(name string) *mesh_proto.TracingBackend

func (*MeshResource) GetTracingBackends

func (m *MeshResource) GetTracingBackends() string

GetTracingBackends will return tracing backends as comma separated strings if empty return empty string

func (*MeshResource) HasPrometheusMetricsEnabled

func (m *MeshResource) HasPrometheusMetricsEnabled() bool

func (*MeshResource) LocalityAwareLbEnabled

func (m *MeshResource) LocalityAwareLbEnabled() bool

func (*MeshResource) MTLSEnabled

func (m *MeshResource) MTLSEnabled() bool

func (*MeshResource) MarshalLog

func (m *MeshResource) MarshalLog() interface{}

func (*MeshResource) SetMeta

func (t *MeshResource) SetMeta(m model.ResourceMeta)

func (*MeshResource) SetSpec

func (t *MeshResource) SetSpec(spec model.ResourceSpec) error

func (*MeshResource) ZoneEgressEnabled

func (m *MeshResource) ZoneEgressEnabled() bool

ZoneEgress works only when mTLS is enabled. Configuration of mTLS is validated on Mesh configuration change and when zoneEgress is enabled.

type MeshResourceList

type MeshResourceList struct {
	Items      []*MeshResource
	Pagination model.Pagination
}

func (*MeshResourceList) AddItem

func (l *MeshResourceList) AddItem(r model.Resource) error

func (*MeshResourceList) GetItemType

func (l *MeshResourceList) GetItemType() model.ResourceType

func (*MeshResourceList) GetItems

func (l *MeshResourceList) GetItems() []model.Resource

func (*MeshResourceList) GetPagination

func (l *MeshResourceList) GetPagination() *model.Pagination

func (*MeshResourceList) MarshalLog

func (ml *MeshResourceList) MarshalLog() interface{}

func (*MeshResourceList) NewItem

func (l *MeshResourceList) NewItem() model.Resource

func (*MeshResourceList) SetPagination

func (l *MeshResourceList) SetPagination(p model.Pagination)

type MetaDataResource

type MetaDataResource struct {
	Meta model.ResourceMeta
	Spec *mesh_proto.MetaData
}

func NewMetaDataResource

func NewMetaDataResource() *MetaDataResource

func (*MetaDataResource) Descriptor

func (*MetaDataResource) GetMeta

func (t *MetaDataResource) GetMeta() model.ResourceMeta

func (*MetaDataResource) GetSpec

func (t *MetaDataResource) GetSpec() model.ResourceSpec

func (*MetaDataResource) IsRemotingMetadata

func (t *MetaDataResource) IsRemotingMetadata(localZone string) bool

func (*MetaDataResource) SetMeta

func (t *MetaDataResource) SetMeta(m model.ResourceMeta)

func (*MetaDataResource) SetSpec

func (t *MetaDataResource) SetSpec(spec model.ResourceSpec) error

type MetaDataResourceList

type MetaDataResourceList struct {
	Items      []*MetaDataResource
	Pagination model.Pagination
}

func (*MetaDataResourceList) AddItem

func (l *MetaDataResourceList) AddItem(r model.Resource) error

func (*MetaDataResourceList) GetItemType

func (l *MetaDataResourceList) GetItemType() model.ResourceType

func (*MetaDataResourceList) GetItems

func (l *MetaDataResourceList) GetItems() []model.Resource

func (*MetaDataResourceList) GetPagination

func (l *MetaDataResourceList) GetPagination() *model.Pagination

func (*MetaDataResourceList) NewItem

func (l *MetaDataResourceList) NewItem() model.Resource

func (*MetaDataResourceList) SetPagination

func (l *MetaDataResourceList) SetPagination(p model.Pagination)

type Protocol

type Protocol string

Protocol identifies a protocol supported by a service.

func ParseProtocol

func ParseProtocol(tag string) Protocol

type ProtocolList

type ProtocolList []Protocol

ProtocolList represents a list of Protocols.

func (ProtocolList) Strings

func (l ProtocolList) Strings() []string

type TagKeyValidatorFunc

type TagKeyValidatorFunc func(path validators.PathBuilder, key string) validators.ValidationError

func SelectorKeyNotInSet

func SelectorKeyNotInSet(keyName ...string) TagKeyValidatorFunc

SelectorKeyNotInSet returns a TagKeyValidatorFunc that checks the tag key is not any one of the given names.

type TagRouteResource

type TagRouteResource struct {
	Meta model.ResourceMeta
	Spec *mesh_proto.TagRoute
}

func NewTagRouteResource

func NewTagRouteResource() *TagRouteResource

func (*TagRouteResource) Descriptor

func (*TagRouteResource) GetMeta

func (t *TagRouteResource) GetMeta() model.ResourceMeta

func (*TagRouteResource) GetSpec

func (t *TagRouteResource) GetSpec() model.ResourceSpec

func (*TagRouteResource) SetMeta

func (t *TagRouteResource) SetMeta(m model.ResourceMeta)

func (*TagRouteResource) SetSpec

func (t *TagRouteResource) SetSpec(spec model.ResourceSpec) error

type TagRouteResourceList

type TagRouteResourceList struct {
	Items      []*TagRouteResource
	Pagination model.Pagination
}

func (*TagRouteResourceList) AddItem

func (l *TagRouteResourceList) AddItem(r model.Resource) error

func (*TagRouteResourceList) GetItemType

func (l *TagRouteResourceList) GetItemType() model.ResourceType

func (*TagRouteResourceList) GetItems

func (l *TagRouteResourceList) GetItems() []model.Resource

func (*TagRouteResourceList) GetPagination

func (l *TagRouteResourceList) GetPagination() *model.Pagination

func (*TagRouteResourceList) NewItem

func (l *TagRouteResourceList) NewItem() model.Resource

func (*TagRouteResourceList) SetPagination

func (l *TagRouteResourceList) SetPagination(p model.Pagination)

type TagValueValidatorFunc

type TagValueValidatorFunc func(path validators.PathBuilder, key, value string) validators.ValidationError

type TagsValidatorFunc

type TagsValidatorFunc func(path validators.PathBuilder, selector map[string]string) validators.ValidationError

func ProtocolValidator

func ProtocolValidator(protocols ...string) TagsValidatorFunc

type ValidateSelectorsOpts

type ValidateSelectorsOpts struct {
	ValidateTagsOpts
	RequireAtMostOneSelector  bool
	RequireAtLeastOneSelector bool
}

type ValidateTagsOpts

type ValidateTagsOpts struct {
	RequireAtLeastOneTag    bool
	RequireService          bool
	ExtraTagsValidators     []TagsValidatorFunc
	ExtraTagKeyValidators   []TagKeyValidatorFunc
	ExtraTagValueValidators []TagValueValidatorFunc
}

type ZoneEgressInsightResource

type ZoneEgressInsightResource struct {
	Meta model.ResourceMeta
	Spec *mesh_proto.ZoneEgressInsight
}

func NewZoneEgressInsightResource

func NewZoneEgressInsightResource() *ZoneEgressInsightResource

func (*ZoneEgressInsightResource) Descriptor

func (*ZoneEgressInsightResource) GetMeta

func (*ZoneEgressInsightResource) GetSpec

func (*ZoneEgressInsightResource) SetMeta

func (*ZoneEgressInsightResource) SetSpec

type ZoneEgressInsightResourceList

type ZoneEgressInsightResourceList struct {
	Items      []*ZoneEgressInsightResource
	Pagination model.Pagination
}

func (*ZoneEgressInsightResourceList) AddItem

func (*ZoneEgressInsightResourceList) GetItemType

func (*ZoneEgressInsightResourceList) GetItems

func (*ZoneEgressInsightResourceList) GetPagination

func (l *ZoneEgressInsightResourceList) GetPagination() *model.Pagination

func (*ZoneEgressInsightResourceList) NewItem

func (*ZoneEgressInsightResourceList) SetPagination

func (l *ZoneEgressInsightResourceList) SetPagination(p model.Pagination)

type ZoneEgressResource

type ZoneEgressResource struct {
	Meta model.ResourceMeta
	Spec *mesh_proto.ZoneEgress
}

func NewZoneEgressResource

func NewZoneEgressResource() *ZoneEgressResource

func (*ZoneEgressResource) AdminAddress

func (r *ZoneEgressResource) AdminAddress(defaultAdminPort uint32) string

func (*ZoneEgressResource) Descriptor

func (*ZoneEgressResource) GetMeta

func (t *ZoneEgressResource) GetMeta() model.ResourceMeta

func (*ZoneEgressResource) GetSpec

func (t *ZoneEgressResource) GetSpec() model.ResourceSpec

func (*ZoneEgressResource) Hash

func (r *ZoneEgressResource) Hash() []byte

func (*ZoneEgressResource) IsIPv6

func (r *ZoneEgressResource) IsIPv6() bool

func (*ZoneEgressResource) SetMeta

func (t *ZoneEgressResource) SetMeta(m model.ResourceMeta)

func (*ZoneEgressResource) SetSpec

func (t *ZoneEgressResource) SetSpec(spec model.ResourceSpec) error

func (*ZoneEgressResource) UsesInboundInterface

func (r *ZoneEgressResource) UsesInboundInterface(address net.IP, port uint32) bool

func (*ZoneEgressResource) Validate

func (r *ZoneEgressResource) Validate() error

type ZoneEgressResourceList

type ZoneEgressResourceList struct {
	Items      []*ZoneEgressResource
	Pagination model.Pagination
}

func (*ZoneEgressResourceList) AddItem

func (*ZoneEgressResourceList) GetItemType

func (l *ZoneEgressResourceList) GetItemType() model.ResourceType

func (*ZoneEgressResourceList) GetItems

func (l *ZoneEgressResourceList) GetItems() []model.Resource

func (*ZoneEgressResourceList) GetPagination

func (l *ZoneEgressResourceList) GetPagination() *model.Pagination

func (*ZoneEgressResourceList) NewItem

func (l *ZoneEgressResourceList) NewItem() model.Resource

func (*ZoneEgressResourceList) SetPagination

func (l *ZoneEgressResourceList) SetPagination(p model.Pagination)

type ZoneIngressInsightResource

type ZoneIngressInsightResource struct {
	Meta model.ResourceMeta
	Spec *mesh_proto.ZoneIngressInsight
}

func NewZoneIngressInsightResource

func NewZoneIngressInsightResource() *ZoneIngressInsightResource

func (*ZoneIngressInsightResource) Descriptor

func (*ZoneIngressInsightResource) GetMeta

func (*ZoneIngressInsightResource) GetSpec

func (*ZoneIngressInsightResource) SetMeta

func (*ZoneIngressInsightResource) SetSpec

type ZoneIngressInsightResourceList

type ZoneIngressInsightResourceList struct {
	Items      []*ZoneIngressInsightResource
	Pagination model.Pagination
}

func (*ZoneIngressInsightResourceList) AddItem

func (*ZoneIngressInsightResourceList) GetItemType

func (*ZoneIngressInsightResourceList) GetItems

func (*ZoneIngressInsightResourceList) GetPagination

func (l *ZoneIngressInsightResourceList) GetPagination() *model.Pagination

func (*ZoneIngressInsightResourceList) NewItem

func (*ZoneIngressInsightResourceList) SetPagination

func (l *ZoneIngressInsightResourceList) SetPagination(p model.Pagination)

type ZoneIngressResource

type ZoneIngressResource struct {
	Meta model.ResourceMeta
	Spec *mesh_proto.ZoneIngress
}

func NewZoneIngressResource

func NewZoneIngressResource() *ZoneIngressResource

func (*ZoneIngressResource) AdminAddress

func (r *ZoneIngressResource) AdminAddress(defaultAdminPort uint32) string

func (*ZoneIngressResource) Descriptor

func (*ZoneIngressResource) GetMeta

func (t *ZoneIngressResource) GetMeta() model.ResourceMeta

func (*ZoneIngressResource) GetSpec

func (t *ZoneIngressResource) GetSpec() model.ResourceSpec

func (*ZoneIngressResource) HasPublicAddress

func (r *ZoneIngressResource) HasPublicAddress() bool

func (*ZoneIngressResource) Hash

func (r *ZoneIngressResource) Hash() []byte

func (*ZoneIngressResource) IsRemoteIngress

func (r *ZoneIngressResource) IsRemoteIngress(localZone string) bool

func (*ZoneIngressResource) SetMeta

func (t *ZoneIngressResource) SetMeta(m model.ResourceMeta)

func (*ZoneIngressResource) SetSpec

func (t *ZoneIngressResource) SetSpec(spec model.ResourceSpec) error

func (*ZoneIngressResource) UsesInboundInterface

func (r *ZoneIngressResource) UsesInboundInterface(address net.IP, port uint32) bool

func (*ZoneIngressResource) Validate

func (r *ZoneIngressResource) Validate() error

type ZoneIngressResourceList

type ZoneIngressResourceList struct {
	Items      []*ZoneIngressResource
	Pagination model.Pagination
}

func (*ZoneIngressResourceList) AddItem

func (*ZoneIngressResourceList) GetItemType

func (l *ZoneIngressResourceList) GetItemType() model.ResourceType

func (*ZoneIngressResourceList) GetItems

func (l *ZoneIngressResourceList) GetItems() []model.Resource

func (*ZoneIngressResourceList) GetPagination

func (l *ZoneIngressResourceList) GetPagination() *model.Pagination

func (*ZoneIngressResourceList) NewItem

func (l *ZoneIngressResourceList) NewItem() model.Resource

func (*ZoneIngressResourceList) SetPagination

func (l *ZoneIngressResourceList) SetPagination(p model.Pagination)

Jump to

Keyboard shortcuts

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