mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
define instances v2
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
This commit is contained in:
parent
e24a42f07b
commit
531be1d28e
@ -49,6 +49,9 @@ type Interface interface {
|
|||||||
LoadBalancer() (LoadBalancer, bool)
|
LoadBalancer() (LoadBalancer, bool)
|
||||||
// Instances returns an instances interface. Also returns true if the interface is supported, false otherwise.
|
// Instances returns an instances interface. Also returns true if the interface is supported, false otherwise.
|
||||||
Instances() (Instances, bool)
|
Instances() (Instances, bool)
|
||||||
|
// InstancesV2 is an implementation for instances only used by cloud node-controller now.
|
||||||
|
// Also returns true if the interface is supported, false otherwise.
|
||||||
|
InstancesV2() (InstancesV2, bool)
|
||||||
// Zones returns a zones interface. Also returns true if the interface is supported, false otherwise.
|
// Zones returns a zones interface. Also returns true if the interface is supported, false otherwise.
|
||||||
Zones() (Zones, bool)
|
Zones() (Zones, bool)
|
||||||
// Clusters returns a clusters interface. Also returns true if the interface is supported, false otherwise.
|
// Clusters returns a clusters interface. Also returns true if the interface is supported, false otherwise.
|
||||||
@ -186,6 +189,17 @@ type Instances interface {
|
|||||||
InstanceShutdownByProviderID(ctx context.Context, providerID string) (bool, error)
|
InstanceShutdownByProviderID(ctx context.Context, providerID string) (bool, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// InstancesV2 is an abstract, pluggable interface for sets of instances.
|
||||||
|
// Unlike Instances, it is only used by cloud node-controller now.
|
||||||
|
type InstancesV2 interface {
|
||||||
|
// InstanceExistsByProviderID returns true if the instance for the given provider exists.
|
||||||
|
InstanceExistsByProviderID(ctx context.Context, providerID string) (bool, error)
|
||||||
|
// InstanceShutdownByProviderID returns true if the instance is shutdown in cloudprovider.
|
||||||
|
InstanceShutdownByProviderID(ctx context.Context, providerID string) (bool, error)
|
||||||
|
// InstanceMetadataByProviderID returns the instance's metadata.
|
||||||
|
InstanceMetadataByProviderID(ctx context.Context, providerID string) (*InstanceMetadata, error)
|
||||||
|
}
|
||||||
|
|
||||||
// Route is a representation of an advanced routing rule.
|
// Route is a representation of an advanced routing rule.
|
||||||
type Route struct {
|
type Route struct {
|
||||||
// Name is the name of the routing rule in the cloud-provider.
|
// Name is the name of the routing rule in the cloud-provider.
|
||||||
|
Loading…
Reference in New Issue
Block a user