Documentation ¶
Index ¶
- Constants
- func CreateOrUpdateWithStatus[T client.Object](ctx context.Context, cli client.Client, obj T, fun func(obj T) error) error
- func RenderManifets(uid string, image string, edgehubaddress string, certs v1beta1.Certs) []client.Object
- func Run(ctx context.Context, options *Options) error
- type CreateClusterRequest
- type CreateClusterResponse
- type EdgeClusterAPI
- func (a *EdgeClusterAPI) GetEdgeCluster(resp http.ResponseWriter, req *http.Request)
- func (a *EdgeClusterAPI) GetEdgeHub(resp http.ResponseWriter, req *http.Request)
- func (a *EdgeClusterAPI) InstallAgentTemplate(resp http.ResponseWriter, req *http.Request)
- func (a *EdgeClusterAPI) ListEdgeClusters(resp http.ResponseWriter, req *http.Request)
- func (a *EdgeClusterAPI) ListEdgeHubs(resp http.ResponseWriter, req *http.Request)
- func (a *EdgeClusterAPI) PreCreateEdgeCluster(resp http.ResponseWriter, req *http.Request)
- func (a *EdgeClusterAPI) Proxy(resp http.ResponseWriter, req *http.Request)
- func (a *EdgeClusterAPI) RegisterRoute(r *route.Group)
- func (a *EdgeClusterAPI) RemoveEdgeCluster(resp http.ResponseWriter, req *http.Request)
- func (a *EdgeClusterAPI) UpdateEdgeCluster(resp http.ResponseWriter, req *http.Request)
- type EdgeClusterK8sStore
- func (s EdgeClusterK8sStore) Delete(ctx context.Context, name string) (*v1beta1.EdgeCluster, error)
- func (s EdgeClusterK8sStore) Get(ctx context.Context, name string) (*v1beta1.EdgeCluster, error)
- func (s EdgeClusterK8sStore) List(ctx context.Context, options ListOptions) (int, []v1beta1.EdgeCluster, error)
- func (s EdgeClusterK8sStore) Update(ctx context.Context, name string, fun func(cluster *v1beta1.EdgeCluster) error) (*v1beta1.EdgeCluster, error)
- type EdgeClusterStore
- type EdgeHubItem
- type EdgeHubK8sStore
- func (s EdgeHubK8sStore) Delete(ctx context.Context, name string) (*v1beta1.EdgeHub, error)
- func (s EdgeHubK8sStore) Get(ctx context.Context, name string) (*v1beta1.EdgeHub, error)
- func (s EdgeHubK8sStore) List(ctx context.Context, options ListOptions) (int, []v1beta1.EdgeHub, error)
- func (s EdgeHubK8sStore) Update(ctx context.Context, name string, fun func(cluster *v1beta1.EdgeHub) error) (*v1beta1.EdgeHub, error)
- type EdgeHubStore
- type EdgeManager
- func (m *EdgeManager) ListPage(ctx context.Context, opts request.ListOptions, ...) (response.Page[v1beta1.EdgeCluster], error)
- func (m *EdgeManager) OnTunnelConnectedStatusChange(ctx context.Context, connected bool, isrefresh bool, fromname string, ...) error
- func (m *EdgeManager) PreCreate(ctx context.Context, example *v1beta1.EdgeCluster) (*v1beta1.EdgeCluster, error)
- func (m *EdgeManager) RenderInstallManifests(ctx context.Context, uid, token string) ([]byte, error)
- func (s *EdgeManager) SyncTunnelStatusFrom(ctx context.Context, server *tunnel.TunnelServer) error
- type EdgeServer
- type InstallerTemplateValues
- type ListOptions
- type Options
- type PrecreateOptions
Constants ¶
View Source
const DefaultEdgeAgentImage = "docker.io/kubegems/kubegems-edge-agent:latest"
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdateWithStatus ¶ added in v1.23.8
func CreateOrUpdateWithStatus[T client.Object](ctx context.Context, cli client.Client, obj T, fun func(obj T) error) error
nolint: nestif,funlen,gocognit,forcetypeassert
Types ¶
type CreateClusterRequest ¶ added in v1.23.8
type CreateClusterRequest struct {
PrecreateOptions
}
type CreateClusterResponse ¶ added in v1.23.8
type EdgeClusterAPI ¶ added in v1.23.8
type EdgeClusterAPI struct { Cluster *EdgeManager Tunnel *tunnel.TunnelServer }
func (*EdgeClusterAPI) GetEdgeCluster ¶ added in v1.23.8
func (a *EdgeClusterAPI) GetEdgeCluster(resp http.ResponseWriter, req *http.Request)
func (*EdgeClusterAPI) GetEdgeHub ¶ added in v1.23.8
func (a *EdgeClusterAPI) GetEdgeHub(resp http.ResponseWriter, req *http.Request)
func (*EdgeClusterAPI) InstallAgentTemplate ¶ added in v1.23.8
func (a *EdgeClusterAPI) InstallAgentTemplate(resp http.ResponseWriter, req *http.Request)
func (*EdgeClusterAPI) ListEdgeClusters ¶ added in v1.23.8
func (a *EdgeClusterAPI) ListEdgeClusters(resp http.ResponseWriter, req *http.Request)
func (*EdgeClusterAPI) ListEdgeHubs ¶ added in v1.23.8
func (a *EdgeClusterAPI) ListEdgeHubs(resp http.ResponseWriter, req *http.Request)
func (*EdgeClusterAPI) PreCreateEdgeCluster ¶ added in v1.23.8
func (a *EdgeClusterAPI) PreCreateEdgeCluster(resp http.ResponseWriter, req *http.Request)
func (*EdgeClusterAPI) Proxy ¶ added in v1.23.8
func (a *EdgeClusterAPI) Proxy(resp http.ResponseWriter, req *http.Request)
func (*EdgeClusterAPI) RegisterRoute ¶ added in v1.23.8
func (a *EdgeClusterAPI) RegisterRoute(r *route.Group)
func (*EdgeClusterAPI) RemoveEdgeCluster ¶ added in v1.23.8
func (a *EdgeClusterAPI) RemoveEdgeCluster(resp http.ResponseWriter, req *http.Request)
func (*EdgeClusterAPI) UpdateEdgeCluster ¶ added in v1.23.8
func (a *EdgeClusterAPI) UpdateEdgeCluster(resp http.ResponseWriter, req *http.Request)
type EdgeClusterK8sStore ¶ added in v1.23.8
type EdgeClusterK8sStore struct {
// contains filtered or unexported fields
}
func (EdgeClusterK8sStore) Delete ¶ added in v1.23.8
func (s EdgeClusterK8sStore) Delete(ctx context.Context, name string) (*v1beta1.EdgeCluster, error)
func (EdgeClusterK8sStore) Get ¶ added in v1.23.8
func (s EdgeClusterK8sStore) Get(ctx context.Context, name string) (*v1beta1.EdgeCluster, error)
func (EdgeClusterK8sStore) List ¶ added in v1.23.8
func (s EdgeClusterK8sStore) List(ctx context.Context, options ListOptions) (int, []v1beta1.EdgeCluster, error)
func (EdgeClusterK8sStore) Update ¶ added in v1.23.8
func (s EdgeClusterK8sStore) Update(ctx context.Context, name string, fun func(cluster *v1beta1.EdgeCluster) error) (*v1beta1.EdgeCluster, error)
type EdgeClusterStore ¶ added in v1.23.8
type EdgeClusterStore interface { List(ctx context.Context, options ListOptions) (int, []v1beta1.EdgeCluster, error) Get(ctx context.Context, name string) (*v1beta1.EdgeCluster, error) Update(ctx context.Context, name string, fun func(cluster *v1beta1.EdgeCluster) error) (*v1beta1.EdgeCluster, error) Delete(ctx context.Context, name string) (*v1beta1.EdgeCluster, error) }
type EdgeHubItem ¶ added in v1.23.8
type EdgeHubK8sStore ¶ added in v1.23.8
type EdgeHubK8sStore struct {
// contains filtered or unexported fields
}
func (EdgeHubK8sStore) List ¶ added in v1.23.8
func (s EdgeHubK8sStore) List(ctx context.Context, options ListOptions) (int, []v1beta1.EdgeHub, error)
type EdgeHubStore ¶ added in v1.23.8
type EdgeHubStore interface { List(ctx context.Context, options ListOptions) (int, []v1beta1.EdgeHub, error) Get(ctx context.Context, name string) (*v1beta1.EdgeHub, error) Update(ctx context.Context, name string, fun func(cluster *v1beta1.EdgeHub) error) (*v1beta1.EdgeHub, error) Delete(ctx context.Context, name string) (*v1beta1.EdgeHub, error) }
type EdgeManager ¶ added in v1.23.8
type EdgeManager struct { SelfAddress string ClusterStore EdgeClusterStore HubStore EdgeHubStore }
func NewClusterManager ¶ added in v1.23.8
func (*EdgeManager) ListPage ¶ added in v1.23.8
func (m *EdgeManager) ListPage( ctx context.Context, opts request.ListOptions, labels, manufacture labels.Selector, ) (response.Page[v1beta1.EdgeCluster], error)
func (*EdgeManager) OnTunnelConnectedStatusChange ¶ added in v1.23.8
func (m *EdgeManager) OnTunnelConnectedStatusChange(ctx context.Context, connected bool, isrefresh bool, fromname string, fromannotations map[string]string, name string, anno map[string]string, ) error
OnTunnelConnectedStatusChange is called when tunnel connected status changed nolint: funlen
func (*EdgeManager) PreCreate ¶ added in v1.23.8
func (m *EdgeManager) PreCreate(ctx context.Context, example *v1beta1.EdgeCluster) (*v1beta1.EdgeCluster, error)
return a register address
func (*EdgeManager) RenderInstallManifests ¶ added in v1.23.8
func (*EdgeManager) SyncTunnelStatusFrom ¶ added in v1.23.8
func (s *EdgeManager) SyncTunnelStatusFrom(ctx context.Context, server *tunnel.TunnelServer) error
type EdgeServer ¶
type EdgeServer struct {
// contains filtered or unexported fields
}
func NewEdgeServer ¶
func NewEdgeServer(ctx context.Context, options *Options) (*EdgeServer, error)
func (*EdgeServer) HTTPAPI ¶
func (s *EdgeServer) HTTPAPI() http.Handler
type InstallerTemplateValues ¶ added in v1.23.8
type ListOptions ¶ added in v1.23.8
type Options ¶ added in v1.23.8
type Options struct { Listen string `json:"listen,omitempty"` Host string `json:"host,omitempty"` ListenGrpc string `json:"listenGrpc,omitempty"` ServerID string `json:"serverID,omitempty"` TLS *system.TLS `json:"tls,omitempty"` Database database.Options `json:"database,omitempty"` }
func NewDefaultOptions ¶ added in v1.23.8
func NewDefaultOptions() *Options
type PrecreateOptions ¶ added in v1.23.8
type PrecreateOptions struct { UID string `json:"uid,omitempty"` HubName string `json:"hubName,omitempty"` // hub name edge cluster registered to Annotations map[string]string `json:"annotations,omitempty"` // edge annotations Labels map[string]string `json:"labels,omitempty"` // edge labels AgentImage string `json:"agentImage,omitempty"` // agent image edge cluster used to register CreateCert bool `json:"createCert,omitempty"` // pre generated edge certificate CertExpireAt *time.Time `json:"certExpireAt,omitempty"` // the expiration of the certificate }
Click to show internal directories.
Click to hide internal directories.