constellation/coordinator/pubapi/core.go
Leonard Cohnen 2d8fcd9bf4 monorepo
Co-authored-by: Malte Poll <mp@edgeless.systems>
Co-authored-by: katexochen <katexochen@users.noreply.github.com>
Co-authored-by: Daniel Weiße <dw@edgeless.systems>
Co-authored-by: Thomas Tendyck <tt@edgeless.systems>
Co-authored-by: Benedict Schlueter <bs@edgeless.systems>
Co-authored-by: leongross <leon.gross@rub.de>
Co-authored-by: Moritz Eckert <m1gh7ym0@gmail.com>
2022-03-22 16:09:39 +01:00

32 lines
963 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
AddAdmin(pubKey []byte) (string, error)
GenerateNextIP() (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) ([]byte, error)
JoinCluster(kubeadm.BootstrapTokenDiscovery) error
}