mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 22:34:56 -04:00

sed -i '1i/*\nCopyright (c) Edgeless Systems GmbH\n\nSPDX-License-Identifier: AGPL-3.0-only\n*/\n' `grep -rL --include='*.go' 'DO NOT EDIT'` gofumpt -w .
37 lines
963 B
Go
37 lines
963 B
Go
/*
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
package fallback
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/edgelesssys/constellation/internal/deploy/ssh"
|
|
"github.com/edgelesssys/constellation/internal/role"
|
|
)
|
|
|
|
// Fetcher implements metadata.Fetcher interface but does not actually fetch cloud provider metadata.
|
|
type Fetcher struct{}
|
|
|
|
func (f Fetcher) Role(_ context.Context) (role.Role, error) {
|
|
// Fallback fetcher does not try to fetch role
|
|
return role.Unknown, nil
|
|
}
|
|
|
|
func (f Fetcher) DiscoverDebugdIPs(ctx context.Context) ([]string, error) {
|
|
// Fallback fetcher does not try to discover debugd IPs
|
|
return nil, nil
|
|
}
|
|
|
|
func (f Fetcher) DiscoverLoadbalancerIP(ctx context.Context) (string, error) {
|
|
// Fallback fetcher does not try to discover loadbalancer IP
|
|
return "", nil
|
|
}
|
|
|
|
func (f Fetcher) FetchSSHKeys(ctx context.Context) ([]ssh.UserKey, error) {
|
|
// Fallback fetcher does not try to fetch ssh keys
|
|
return nil, nil
|
|
}
|