Versions in this module Expand all Collapse all v0 v0.0.2-qual Mar 20, 2021 v0.0.1 Jun 13, 2020 Changes in this version + const BufferSize + const CLUSTER_DNS_IP + const CMD_TASK_PREFIX + const DNSMODE_DNS + const DNSMODE_KUBERNETES + const DNSMODE_NONE + const EXT_APIACCESS + const EXT_DNS + const IPCHAIN + const IPTAB + const KUBELINK_DNS_IP + const MANAGE_MODE_CERT + const MANAGE_MODE_NONE + const MANAGE_MODE_SELF + const PACKET_TYPE_DATA + const PACKET_TYPE_HELLO + func Base64Encode(data []byte, max int) string + func Create(controller controller.Interface) (reconcile.Interface, error) + func CreateSecrets(controller controller.Interface) (reconcile.Interface, error) + func DefaultLinkName(ip net.IP) string + func NewTunnelConnection(mux *Mux, conn net.Conn, link *kubelink.Link, ...) (*TunnelConnection, *ConnectionHello, error) + func RegisterExtension(id byte, c ConnectionHelloExtensionHandler) + func SetLinkAddress(logger logger.LogContext, link netlink.Link, addr *net.IPNet) error + func TaskReconciler(count int) controller.ConfigurationModifier + type APIExtension kubelink.LinkAccessInfo + func (this *APIExtension) Data() []byte + func (this *APIExtension) Id() byte + func (this *APIExtension) String() string + type APIExtensionHandler struct + func (this *APIExtensionHandler) Add(hello *ConnectionHello, mux *Mux) + func (this *APIExtensionHandler) Parse(id byte, data []byte) (ConnectionHelloExtension, error) + type BaseTask struct + func NewBaseTask(ttype, name string) BaseTask + func (this *BaseTask) Execute(logger logger.LogContext) reconcile.Status + func (this *BaseTask) Id() string + type CertInfo struct + func NewCertInfo(logger logger.LogContext, source certs.CertificateSource) *CertInfo + func (this *CertInfo) ClientConfig() *tls.Config + func (this *CertInfo) Dial(endpoint string) (net.Conn, error) + func (this *CertInfo) ServerConfig() *tls.Config + func (this *CertInfo) UseTLS() bool + type Config struct + AdvertisedPort int + AutoConnect bool + CACertFile string + CertFile string + ClusterAddress *net.IPNet + ClusterCIDR *net.IPNet + ClusterDomain string + ClusterName string + CoreDNSConfigure bool + CoreDNSDeployment string + CoreDNSSecret string + CoreDNSServiceIP net.IP + DNSAdvertisement bool + DNSName string + DNSPropagation string + DNSServiceIP net.IP + DisableBridge bool + Interface string + KeyFile string + ManageMode string + MeshDomain string + Port int + Responsible utils.StringSet + Secret string + Service string + ServiceAccount resources.ObjectName + ServiceCIDR *net.IPNet + func (this *Config) AddOptionsToSet(set config.OptionSet) + func (this *Config) MatchLink(obj *v1alpha1.KubeLink) (bool, net.IP) + func (this *Config) Prepare() error + type ConnectionFailHandler interface + Notify func(*TunnelConnection, error) + type ConnectionHandler interface + GetAccess func() kubelink.LinkAccessInfo + GetDNSInfo func() kubelink.LinkDNSInfo + UpdateAccess func(hello *ConnectionHello) + type ConnectionHello struct + Extensions map[byte]ConnectionHelloExtension + Raw map[byte][]byte + func NewConnectionHello() *ConnectionHello + func ParseConnectionHello(logger logger.LogContext, header *ConnectionHelloHeader, data []byte) (*ConnectionHello, error) + func (this *ConnectionHello) Data() []byte + type ConnectionHelloExtension interface + Data func() []byte + Id func() byte + func GetExtension(id byte, data []byte) (ConnectionHelloExtension, error) + type ConnectionHelloExtensionHandler interface + Add func(hello *ConnectionHello, mux *Mux) + Parse func(id byte, data []byte) (ConnectionHelloExtension, error) + type ConnectionHelloHeader [net.IPv6len * 5]byte + func (this *ConnectionHelloHeader) GetCIDR() *net.IPNet + func (this *ConnectionHelloHeader) GetClusterAddress() net.IP + func (this *ConnectionHelloHeader) GetClusterCIDR() *net.IPNet + func (this *ConnectionHelloHeader) GetExtensionLength() uint16 + func (this *ConnectionHelloHeader) GetPort() uint16 + func (this *ConnectionHelloHeader) SetCIDR(cidr *net.IPNet) + func (this *ConnectionHelloHeader) SetClusterAddress(ip net.IP) + func (this *ConnectionHelloHeader) SetClusterCIDR(cidr *net.IPNet) + func (this *ConnectionHelloHeader) SetExtensionLength(len uint16) + func (this *ConnectionHelloHeader) SetPort(port uint16) + type DNSExtension kubelink.LinkDNSInfo + func (this *DNSExtension) Data() []byte + func (this *DNSExtension) Id() byte + func (this *DNSExtension) String() string + type DNSExtensionHandler struct + func (this *DNSExtensionHandler) Add(hello *ConnectionHello, mux *Mux) + func (this *DNSExtensionHandler) Parse(id byte, data []byte) (ConnectionHelloExtension, error) + type DefaultConnectionHandler struct + func (this *DefaultConnectionHandler) GetAccess() kubelink.LinkAccessInfo + func (this *DefaultConnectionHandler) GetDNSInfo() kubelink.LinkDNSInfo + func (this *DefaultConnectionHandler) UpdateAccess(hello *ConnectionHello) + type Kubeconfig Manifest + func NewKubeconfig() Kubeconfig + func (this Kubeconfig) AddCluster(name, url, ca, token string) + type LinkStateHandler interface + Notify func(*kubelink.Link, error) + type Manifest map[string]interface + type Mux struct + func NewMux(ctx context.Context, logger logger.LogContext, certInfo *CertInfo, port uint16, ...) *Mux + func (this *Mux) AddTunnel(t *TunnelConnection) + func (this *Mux) AssureTunnel(logger logger.LogContext, link *kubelink.Link) (*TunnelConnection, error) + func (this *Mux) Close(ip net.IP) error + func (this *Mux) FindConnection(log logger.LogContext, packet []byte) *TunnelConnection + func (this *Mux) GetConnectionForIP(ip net.IP) (*TunnelConnection, error) + func (this *Mux) GetError(ip net.IP) error + func (this *Mux) HandleTun() error + func (this *Mux) Notify(t *TunnelConnection, err error) + func (this *Mux) QueryConnectionForIP(ip net.IP) (*TunnelConnection, *kubelink.Link) + func (this *Mux) RegisterFailHandler(handlers ...LinkStateHandler) + func (this *Mux) RemoveTunnel(t *TunnelConnection) + func (this *Mux) ServeConnection(ctx context.Context, conn net.Conn) + func (this *Mux) SetAutoConnect(b bool) + type SecretCache struct + func GetSharedSecrets(controller controller.Interface) *SecretCache + func NewSecretCache() *SecretCache + func (this *SecretCache) AllocSecret(name resources.ObjectName, link resources.ObjectName) + func (this *SecretCache) GetSecretUsers(name resources.ObjectName) resources.ObjectNameSet + func (this *SecretCache) ReleaseSecret(name resources.ObjectName, link resources.ObjectName) + func (this *SecretCache) ReleaseSecretForLink(link resources.ObjectName) + func (this *SecretCache) UpdateSecret(name resources.ObjectName, link resources.ObjectName) + type Server struct + func NewServer(name string, mux *Mux) *Server + func (this *Server) Start(certInfo *CertInfo, bindAddress string, port int) + type Task interface + Execute func(logger logger.LogContext) reconcile.Status + Id func() string + func NewConnectTask(name string, reconciler *reconciler) Task + type Tasks interface + ScheduleTask func(task Task, override bool) + func GetTaskClient(controller controller.Interface) Tasks + type Tun struct + func NewTun(logger logger.LogContext, name string, clusterAddress *net.IPNet) (*Tun, error) + func (this *Tun) Close() error + func (this *Tun) Read(buf []byte) (int, error) + func (this *Tun) String() string + func (this *Tun) Write(data []byte) (int, error) + type TunnelConnection struct + func (this *TunnelConnection) Close() error + func (this *TunnelConnection) ReadPacket(data []byte) (int, byte, error) + func (this *TunnelConnection) RegisterStateHandler(handlers ...ConnectionFailHandler) + func (this *TunnelConnection) Serve() error + func (this *TunnelConnection) String() string + func (this *TunnelConnection) WritePacket(ty byte, data []byte) error