Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AddRegistryFactory ¶
func AddRegistryFactory(name string, factory RegistryFactory)
AddRegistryFactory will be used by the user to register a new registry
func FakeServiceEntryStore ¶
func FakeServiceEntryStore() *fakeServiceEntryStore
Types ¶
type Protocol ¶
type Protocol string
The protocol defined here should match the protocol field in istio's ServicePort See https://github.com/istio/api/issues/3056
func ParseProtocol ¶
type Registry ¶
type Registry interface { Start(config RegistryConfig) error Stop() error // Reload provides an effective way to update the configuration than Start & Stop Reload(config RegistryConfig) error Config() RegistryConfig }
Registry is the interface that all registries must implement
func CreateRegistry ¶
func CreateRegistry(name string, store ServiceEntryStore, om metav1.ObjectMeta) (Registry, error)
CreateRegistry is called by HTNN to create a new registry
type RegistryConfig ¶
type RegistryConfig interface { // The configuration is defined as a protobuf message ProtoReflect() protoreflect.Message // This method is generated by protoc-gen-validate. We can override it to provide custom validation Validate() error }
RegistryConfig represents the configuration used by the registry
func ParseConfig ¶
func ParseConfig(reg Registry, data []byte) (RegistryConfig, error)
ParseConfig parses the given data and returns the configuration according to the registry
type RegistryFactory ¶
type RegistryFactory func(store ServiceEntryStore, om metav1.ObjectMeta) (Registry, error)
RegistryFactory provides methods to prepare configuration & create registry
type ServiceEntryStore ¶
type ServiceEntryStore interface { Update(service string, se *ServiceEntryWrapper) Delete(service string) }
ServiceEntryStore is the store of ServiceEntryWrapper. The service must be a valid k8s service name. It will be used as both the name of the ServiceEntry used by Istio (the unique key in control plane), and the domain of the cluster used by Envoy (the unique key in data plane).
type ServiceEntryWrapper ¶
type ServiceEntryWrapper struct { istioapi.ServiceEntry Source string }
ServiceEntryWrapper is a wrapper around the istio's ServiceEntry