Documentation ¶
Index ¶
- Constants
- func IndexToken(revision string, dr *kusciaapisv1alpha1.DomainRoute) (int, kusciaapisv1alpha1.DomainRouteToken)
- func RegisterDomain(namespace, path, csrData string, priKey *rsa.PrivateKey, ...) error
- func UpdateDomainRouteRevisionToken(kusciaClient clientset.Interface, namespace, drName string, ...) error
- type AfterRegisterDomainHook
- type DestinationStatus
- type DomainPorts
- type DomainRouteConfig
- type DomainRouteController
- type EndpointsController
- func (ec *EndpointsController) AddEnvoyCluster(namespace string, name string, protocol string, hosts map[string][]uint32, ...) error
- func (ec *EndpointsController) AddEnvoyClusterByEndpoints(service *v1.Service, endpoints *v1.Endpoints, protocol string, ...) error
- func (ec *EndpointsController) AddEnvoyClusterByExternalName(service *v1.Service, protocol string, namespace string, name string, ...) error
- func (ec *EndpointsController) Run(workers int, stopCh <-chan struct{})
- type GatewayController
- type RegisterJwtClaims
- type RevisionToken
- type Token
Constants ¶
View Source
const (
NoopToken = "noop"
)
Variables ¶
This section is empty.
Functions ¶
func IndexToken ¶
func IndexToken(revision string, dr *kusciaapisv1alpha1.DomainRoute) (int, kusciaapisv1alpha1.DomainRouteToken)
func RegisterDomain ¶
func RegisterDomain(namespace, path, csrData string, priKey *rsa.PrivateKey, afterRegisterHook AfterRegisterDomainHook) error
func UpdateDomainRouteRevisionToken ¶
func UpdateDomainRouteRevisionToken(kusciaClient clientset.Interface, namespace, drName string, revisionToken *RevisionToken) error
Types ¶
type AfterRegisterDomainHook ¶
type AfterRegisterDomainHook func(response *handshake.RegisterResponse)
type DestinationStatus ¶
type DestinationStatus int
const ( TokenReady DestinationStatus = iota DomainIDInputInvalid TokenRevisionInputInvalid TokenNotReady TokenNotFound NoAuthentication InternalError NetworkUnreachable )
type DomainPorts ¶
type DomainPorts struct {
// contains filtered or unexported fields
}
func (DomainPorts) Len ¶
func (dps DomainPorts) Len() int
func (DomainPorts) Less ¶
func (dps DomainPorts) Less(i, j int) bool
func (DomainPorts) Swap ¶
func (dps DomainPorts) Swap(i, j int)
type DomainRouteConfig ¶
type DomainRouteConfig struct { Namespace string MasterConfig *config.MasterConfig IsMaster bool CAKey *rsa.PrivateKey CACert *x509.Certificate Prikey *rsa.PrivateKey PrikeyData []byte HandshakePort uint32 }
type DomainRouteController ¶
type DomainRouteController struct { CaCertData []byte CaCert *x509.Certificate CaKey *rsa.PrivateKey // contains filtered or unexported fields }
func NewDomainRouteController ¶
func NewDomainRouteController( drConfig *DomainRouteConfig, kubeClient kubernetes.Interface, kusciaClient clientset.Interface, DomainRouteInformer kusciaextv1alpha1.DomainRouteInformer) *DomainRouteController
NewDomainRouteController create a new endpoints controller.
func (*DomainRouteController) DestReplyHandshake ¶
func (c *DomainRouteController) DestReplyHandshake(req *handshake.HandShakeRequest, drName string) *handshake.HandShakeResponse
func (*DomainRouteController) Run ¶
func (c *DomainRouteController) Run(ctx context.Context, threadiness int, stopCh <-chan struct{})
Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.
type EndpointsController ¶
type EndpointsController struct {
// contains filtered or unexported fields
}
func NewEndpointsController ¶
func NewEndpointsController(isMaster bool, kubeClient kubernetes.Interface, serviceInformer corev1informers.ServiceInformer, endpointsInformer corev1informers.EndpointsInformer, whitelistFile string, clientCert *xds.TLSCert) (*EndpointsController, error)
func (*EndpointsController) AddEnvoyCluster ¶
func (*EndpointsController) AddEnvoyClusterByEndpoints ¶
func (*EndpointsController) AddEnvoyClusterByExternalName ¶
func (*EndpointsController) Run ¶
func (ec *EndpointsController) Run(workers int, stopCh <-chan struct{})
type GatewayController ¶
type GatewayController struct {
// contains filtered or unexported fields
}
GatewayController sync gateway status periodically to master.
func NewGatewayController ¶
func NewGatewayController(namespace string, prikey *rsa.PrivateKey, kusciaClient kusciaclientset.Interface, informer kusciaextv1alpha1.GatewayInformer) (*GatewayController, error)
NewGatewayController returns a new GatewayController.
func (*GatewayController) GatewayName ¶
func (c *GatewayController) GatewayName() string
func (*GatewayController) Run ¶
func (c *GatewayController) Run(threadiness int, stopCh <-chan struct{})
Run begins watching and syncing.
func (*GatewayController) UpdateStatus ¶
func (c *GatewayController) UpdateStatus(status []*kusciaapisv1alpha1.GatewayEndpointStatus)
type RegisterJwtClaims ¶
type RevisionToken ¶
type RevisionToken struct { RawToken []byte PublicKey *rsa.PublicKey ExpirationTime int64 Revision int32 }
func HandshakeToMaster ¶
func HandshakeToMaster(domainID string, pathPrefix string, prikey *rsa.PrivateKey) (*RevisionToken, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.