scaleway

package
v0.28.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InstanceTypeInstance = "instance"
	InstanceTypeBaremtal = "baremetal"
)
View Source
const MaxEntriesPerACL = 60
View Source
const (
	// ProviderName define the provider
	ProviderName = "scaleway"
)

Variables

View Source
var (
	BadProviderID          = errors.New("provider ID wrong format: format should be scaleway://product/region/0788e6f4-55b0-42e2-936f-d0c5ecd49a13")
	InstanceDuplicated     = errors.New("duplicated instance results")
	IPAddressNotFound      = errors.New("ip address not found")
	IPAddressInUse         = errors.New("ip address already in use")
	LoadBalancerNotFound   = errors.New("loadbalancer not found")
	LoadBalancerDuplicated = errors.New("loadbalancer duplicated")
	LoadBalancerNotReady   = errors.New("loadbalancer is not ready")
)

Functions

func BuildProviderID

func BuildProviderID(product, localization, id string) string

BuildProviderID build the providerID from given informations

func NewNodePatcher

func NewNodePatcher(kclient kubernetes.Interface, node *v1.Node) kubePatcher

func NewServicePatcher

func NewServicePatcher(kclient kubernetes.Interface, service *v1.Service) kubePatcher

func ServerInfoFromProviderID

func ServerInfoFromProviderID(providerID string) (string, string, string, error)

ServerInfoFromProviderID extract the product type, zone and uuid from the providerID the providerID looks like scaleway://12345 or scaleway://instance/fr-par-1/12345

Types

type AnnotationError

type AnnotationError struct {
	Key   string
	Value string
}

func NewAnnorationError

func NewAnnorationError(key, value string) AnnotationError

func (AnnotationError) Error

func (a AnnotationError) Error() string

type IPAMAPI added in v0.21.7

type IPAMAPI interface {
	ListIPs(req *scwipam.ListIPsRequest, opts ...scw.RequestOption) (*scwipam.ListIPsResponse, error)
}

type InstanceAPI

type InstanceAPI interface {
	ListServers(req *scwinstance.ListServersRequest, opts ...scw.RequestOption) (*scwinstance.ListServersResponse, error)
	GetServer(req *scwinstance.GetServerRequest, opts ...scw.RequestOption) (*scwinstance.GetServerResponse, error)
}

type LoadBalancerAPI

type LoadBalancerAPI interface {
	ListLBs(req *scwlb.ZonedAPIListLBsRequest, opts ...scw.RequestOption) (*scwlb.ListLBsResponse, error)
	GetLB(req *scwlb.ZonedAPIGetLBRequest, opts ...scw.RequestOption) (*scwlb.LB, error)
	CreateLB(req *scwlb.ZonedAPICreateLBRequest, opts ...scw.RequestOption) (*scwlb.LB, error)
	DeleteLB(req *scwlb.ZonedAPIDeleteLBRequest, opts ...scw.RequestOption) error
	MigrateLB(req *scwlb.ZonedAPIMigrateLBRequest, opts ...scw.RequestOption) (*scwlb.LB, error)
	ListIPs(req *scwlb.ZonedAPIListIPsRequest, opts ...scw.RequestOption) (*scwlb.ListIPsResponse, error)
	ListBackends(req *scwlb.ZonedAPIListBackendsRequest, opts ...scw.RequestOption) (*scwlb.ListBackendsResponse, error)
	CreateBackend(req *scwlb.ZonedAPICreateBackendRequest, opts ...scw.RequestOption) (*scwlb.Backend, error)
	UpdateBackend(req *scwlb.ZonedAPIUpdateBackendRequest, opts ...scw.RequestOption) (*scwlb.Backend, error)
	DeleteBackend(req *scwlb.ZonedAPIDeleteBackendRequest, opts ...scw.RequestOption) error
	SetBackendServers(req *scwlb.ZonedAPISetBackendServersRequest, opts ...scw.RequestOption) (*scwlb.Backend, error)
	UpdateHealthCheck(req *scwlb.ZonedAPIUpdateHealthCheckRequest, opts ...scw.RequestOption) (*scwlb.HealthCheck, error)
	ListFrontends(req *scwlb.ZonedAPIListFrontendsRequest, opts ...scw.RequestOption) (*scwlb.ListFrontendsResponse, error)
	CreateFrontend(req *scwlb.ZonedAPICreateFrontendRequest, opts ...scw.RequestOption) (*scwlb.Frontend, error)
	UpdateFrontend(req *scwlb.ZonedAPIUpdateFrontendRequest, opts ...scw.RequestOption) (*scwlb.Frontend, error)
	DeleteFrontend(req *scwlb.ZonedAPIDeleteFrontendRequest, opts ...scw.RequestOption) error
	ListACLs(req *scwlb.ZonedAPIListACLsRequest, opts ...scw.RequestOption) (*scwlb.ListACLResponse, error)
	CreateACL(req *scwlb.ZonedAPICreateACLRequest, opts ...scw.RequestOption) (*scwlb.ACL, error)
	DeleteACL(req *scwlb.ZonedAPIDeleteACLRequest, opts ...scw.RequestOption) error
	UpdateACL(req *scwlb.ZonedAPIUpdateACLRequest, opts ...scw.RequestOption) (*scwlb.ACL, error)
	SetACLs(req *scwlb.ZonedAPISetACLsRequest, opts ...scw.RequestOption) (*scwlb.SetACLsResponse, error)
	ListLBPrivateNetworks(req *scwlb.ZonedAPIListLBPrivateNetworksRequest, opts ...scw.RequestOption) (*scwlb.ListLBPrivateNetworksResponse, error)
	AttachPrivateNetwork(req *scwlb.ZonedAPIAttachPrivateNetworkRequest, opts ...scw.RequestOption) (*scwlb.PrivateNetwork, error)
	DetachPrivateNetwork(req *scwlb.ZonedAPIDetachPrivateNetworkRequest, opts ...scw.RequestOption) error
}

type Logger

type Logger struct{}

Logger completes klog to be able to implement the Logger interface for the SDK

func (Logger) Debugf

func (Logger) Debugf(format string, args ...interface{})

Debugf logs to DEBUG log. Arguments are handled in the manner of fmt.Printf.

func (Logger) Errorf

func (Logger) Errorf(format string, args ...interface{})

Errorf logs to ERROR log. Arguments are handled in the manner of fmt.Printf.

func (Logger) Infof

func (Logger) Infof(format string, args ...interface{})

Infof logs to INFO log. Arguments are handled in the manner of fmt.Printf.

func (Logger) ShouldLog

func (Logger) ShouldLog(level logger.LogLevel) bool

ShouldLog reports whether verbosity level l is at least the requested verbose level.

func (Logger) Warningf

func (Logger) Warningf(format string, args ...interface{})

Warningf logs to WARNING log. Arguments are handled in the manner of fmt.Printf.

type Servers

type Servers interface {
	cloudprovider.Instances
	cloudprovider.InstancesV2
	GetZoneByProviderID(ctx context.Context, providerID string) (cloudprovider.Zone, error)
	GetZoneByNodeName(ctx context.Context, nodeName types.NodeName) (cloudprovider.Zone, error)
}

type ServersZones

type ServersZones interface {
	GetZoneByProviderID(ctx context.Context, providerID string) (cloudprovider.Zone, error)
	GetZoneByNodeName(ctx context.Context, nodeName types.NodeName) (cloudprovider.Zone, error)
}

type VPCAPI added in v0.28.0

type VPCAPI interface {
	GetPrivateNetwork(req *scwvpc.GetPrivateNetworkRequest, opts ...scw.RequestOption) (*scwvpc.PrivateNetwork, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL