mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-27 00:19:36 -05:00
33 lines
1021 B
Go
33 lines
1021 B
Go
package pubapi
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/edgelesssys/constellation/coordinator/peer"
|
|
"github.com/edgelesssys/constellation/coordinator/state"
|
|
kubeadm "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3"
|
|
)
|
|
|
|
type Core interface {
|
|
GetVPNPubKey() ([]byte, error)
|
|
SetVPNIP(string) error
|
|
GetCoordinatorVPNIP() string
|
|
InitializeStoreIPs() error
|
|
AddAdmin(pubKey []byte) (string, error)
|
|
GetNextNodeIP() (string, error)
|
|
SwitchToPersistentStore() error
|
|
GetIDs(masterSecret []byte) (ownerID []byte, clusterID []byte, err error)
|
|
SetUpKMS(ctx context.Context, storageURI, kmsURI, kekID string, useExisting bool) error
|
|
|
|
GetState() state.State
|
|
RequireState(...state.State) error
|
|
AdvanceState(newState state.State, ownerID, clusterID []byte) error
|
|
|
|
GetPeers(resourceVersion int) (int, []peer.Peer, error)
|
|
AddPeer(peer.Peer) error
|
|
UpdatePeers([]peer.Peer) error
|
|
|
|
InitCluster(autoscalingNodeGroups []string, cloudServiceAccountURI string) ([]byte, error)
|
|
JoinCluster(kubeadm.BootstrapTokenDiscovery) error
|
|
}
|