Documentation
¶
Index ¶
- Variables
- func GetClusterFromTrustZoneByName(trustZone *trust_zone_proto.TrustZone, clusterName string, ...) (*clusterpb.Cluster, error)
- func GetClustersByTrustZone(trustZone *trust_zone_proto.TrustZone, ds datasource.DataSource) ([]*clusterpb.Cluster, error)
- func ResolveCluster(trustZone *trust_zone_proto.TrustZone, clusterName string, ...) (*clusterpb.Cluster, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoClustersInTrustZone = errors.New("no clusters in trust zone")
Functions ¶
func GetClusterFromTrustZoneByName ¶ added in v0.25.0
func GetClusterFromTrustZoneByName(trustZone *trust_zone_proto.TrustZone, clusterName string, ds datasource.DataSource) (*clusterpb.Cluster, error)
GetClusterFromTrustZoneByName looks up a named cluster within a trust zone.
func GetClustersByTrustZone ¶ added in v0.25.0
func GetClustersByTrustZone(trustZone *trust_zone_proto.TrustZone, ds datasource.DataSource) ([]*clusterpb.Cluster, error)
GetClustersByTrustZone returns all clusters for a trust zone. Returns ErrNoClustersInTrustZone if the trust zone has no clusters.
func ResolveCluster ¶ added in v0.25.0
func ResolveCluster(trustZone *trust_zone_proto.TrustZone, clusterName string, ds datasource.DataSource) (*clusterpb.Cluster, error)
ResolveCluster resolves a cluster for a trust zone given an optional cluster name. If clusterName is non-empty, it is looked up by name. If clusterName is empty and the trust zone has exactly one cluster, that cluster is returned. If clusterName is empty and the trust zone has multiple clusters, an error is returned instructing the caller to use --cluster to specify one.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.