connector

package
v1.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ConsulDiscoveryService defines consul discovery service name
	ConsulDiscoveryService = "consul"

	//EurekaDiscoveryService defines eureka discovery service name
	EurekaDiscoveryService = "eureka"

	//MachineDiscoveryService defines machine discovery service name
	MachineDiscoveryService = "machine"
)
View Source
const (
	// AnnotationMeshServiceSync defines mesh service sync annotation
	AnnotationMeshServiceSync = "flomesh.io/mesh-service-sync"

	// AnnotationMeshServiceInternalSync defines mesh service internal sync annotation
	AnnotationMeshServiceInternalSync = "flomesh.io/mesh-service-internal-sync"

	// AnnotationCloudServiceInheritedFrom defines cloud service inherited annotation
	AnnotationCloudServiceInheritedFrom = "flomesh.io/cloud-service-inherited-from"

	// AnnotationMeshEndpointAddr defines mesh endpoint addr annotation
	AnnotationMeshEndpointAddr = "flomesh.io/cloud-endpoint-addr"
)
View Source
const (
	// AnnotationServiceSyncK8sToCloud is the key of the annotation that determines
	// whether to sync the k8s Service to Consul/Eureka.
	AnnotationServiceSyncK8sToCloud = "flomesh.io/service-sync-k8s-to-cloud"

	// AnnotationServiceSyncK8sToFgw is the key of the annotation that determines
	// whether to sync the k8s Service to fsm gateway.
	AnnotationServiceSyncK8sToFgw = "flomesh.io/service-sync-k8s-to-fgw"

	// AnnotationServiceName is set to override the name of the service
	// registered. By default this will be the name of the CatalogService resource.
	AnnotationServiceName = "flomesh.io/service-name"

	// AnnotationServicePort specifies the port to use as the service instance
	// port when registering a service. This can be a named port in the
	// service or an integer value.
	AnnotationServicePort = "flomesh.io/service-port"

	// AnnotationServiceTags specifies the tags for the registered service
	// instance. Multiple tags should be comma separated. Whitespace around
	// the tags is automatically trimmed.
	AnnotationServiceTags = "flomesh.io/service-tags"

	// AnnotationServiceMetaPrefix is the prefix for setting meta key/value
	// for a service. The remainder of the key is the meta key.
	AnnotationServiceMetaPrefix = "flomesh.io/service-meta-"

	// AnnotationServiceWeight is the key of the annotation that determines
	// the traffic weight of the service which is spanned over multiple k8s cluster.
	// e.g. CatalogService `backend` in k8s cluster `A` receives 25% of the traffic
	// compared to same `backend` service in k8s cluster `B`.
	AnnotationServiceWeight = "flomesh.io/service-weight"
)
View Source
const (
	// ServiceSourceKey is the key used in the meta to track the "k8s" source.
	ServiceSourceKey = "fsm-connector-external-source"
)

Variables

View Source
var (
	// ServiceSourceValue is the value of the source.
	ServiceSourceValue = "sync-from-k8s"

	// ViaGateway defines gateway settings
	ViaGateway = &Gateway{}
)
View Source
var (
	GatewayAPIEnabled = false
)

Functions

func ServiceInstanceID added in v1.2.0

func ServiceInstanceID(name, addr string, httpPort, grpcPort int) string

ServiceInstanceID generates a unique ID for a service. This ID is not meant to be particularly human-friendly.

func WatchMeshConfigUpdated added in v1.1.4

func WatchMeshConfigUpdated(msgBroker *messaging.Broker, stop <-chan struct{})

WatchMeshConfigUpdated watches update of meshconfig

Types

type Gateway added in v1.2.0

type Gateway struct {
	IngressIPSelector string
	EgressIPSelector  string

	IngressAddr string
	EgressAddr  string

	Ingress ProtocolPort
	Egress  ProtocolPort
}

func (*Gateway) Enable added in v1.2.0

func (gw *Gateway) Enable() bool

type ProtocolPort added in v1.2.0

type ProtocolPort struct {
	HTTPPort uint
	GRPCPort uint
}

Directories

Path Synopsis
Package c2k implements a syncer from cloud to k8s.
Package c2k implements a syncer from cloud to k8s.
Package ktoc contains a reusable abstraction for efficiently watching for changes in resources in a Kubernetes cluster.
Package ktoc contains a reusable abstraction for efficiently watching for changes in resources in a Kubernetes cluster.
Package ktog contains a reusable abstraction for efficiently watching for changes in resources in a Kubernetes cluster.
Package ktog contains a reusable abstraction for efficiently watching for changes in resources in a Kubernetes cluster.

Jump to

Keyboard shortcuts

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