Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetShadowServiceName ¶
GetShadowServiceName returns the shadow service name corresponding to the given service namespace and name.
Types ¶
type Config ¶
type Config struct { ACLEnabled bool DefaultMode string Namespace string WatchNamespaces []string IgnoreNamespaces []string MinHTTPPort int32 MaxHTTPPort int32 MinTCPPort int32 MaxTCPPort int32 MinUDPPort int32 MaxUDPPort int32 }
Config holds the configuration of the controller.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller hold controller configuration.
func NewMeshController ¶
func NewMeshController(clients k8s.Client, cfg Config, store SharedStore, logger logrus.FieldLogger) *Controller
NewMeshController builds the informers and other required components of the mesh controller, and returns an initialized mesh controller object.
type PortMapper ¶
type PortMapper interface { Find(namespace, name string, port int32) (int32, bool) Add(namespace, name string, port int32) (int32, error) Set(namespace, name string, port, targetPort int32) error Remove(namespace, name string, port int32) (int32, bool) }
PortMapper is capable of storing and retrieving a port mapping for a given service.
type ShadowServiceManager ¶
type ShadowServiceManager struct {
// contains filtered or unexported fields
}
ShadowServiceManager manages shadow services.
func (*ShadowServiceManager) LoadPortMapping ¶
func (s *ShadowServiceManager) LoadPortMapping() error
LoadPortMapping loads the port mapping of existing shadow services into the different port mappers.
func (*ShadowServiceManager) SyncService ¶
func (s *ShadowServiceManager) SyncService(ctx context.Context, namespace, name string) error
SyncService synchronizes the given service and its shadow service. If the shadow service doesn't exist it will be created. If it exists it will be updated and if the service doesn't exist, the shadow service will be removed.
type SharedStore ¶
type SharedStore interface {}
SharedStore is used to share the controller state.
type TopologyBuilder ¶
type TopologyBuilder interface {
Build(resourceFilter *k8s.ResourceFilter) (*topology.Topology, error)
}
TopologyBuilder builds Topologies.