tcmesh

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterRoleMaster = "master"
	ClusterRoleRemote = "remote"
)
View Source
const (
	TcmAPIPrefix = "/api/meshes"
)

Variables

View Source
var (
	TcmAuthHeader = tcmHeader{
		Key:   "X-Remote-TenantID",
		Value: "default",
	}
)

Functions

func BuildClientConfig

func BuildClientConfig(config *meshconfig.MeshManagerConfig) (*restclient.Config, error)

Types

type Cacher

type Cacher struct {
	// contains filtered or unexported fields
}

func GetCacher

func GetCacher(ctx context.Context, tcmClient *Client) *Cacher

func (*Cacher) Clusters

func (c *Cacher) Clusters(meshName string) []string

func (*Cacher) GetMainClusterByMemberCluster

func (c *Cacher) GetMainClusterByMemberCluster(clusterName string) []string

func (*Cacher) GetMeshByCluster

func (c *Cacher) GetMeshByCluster(clusterName string) string

func (*Cacher) MainClusters

func (c *Cacher) MainClusters(meshName string) []string

func (*Cacher) MainClustersMap

func (c *Cacher) MainClustersMap(meshName string) map[string]struct{}

func (*Cacher) MemberClusters

func (c *Cacher) MemberClusters(meshName string) []string

func (*Cacher) ReloadMeshes

func (c *Cacher) ReloadMeshes()

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewForConfig

func NewForConfig(c *restclient.Config) (*Client, error)

func (*Client) Cache

func (c *Client) Cache() *Cacher

func (*Client) GetMesh

func (c *Client) GetMesh(ctx context.Context, meshName string) (*types.Mesh, error)

func (*Client) GetMeshes

func (c *Client) GetMeshes(ctx context.Context) ([]types.Mesh, error)

func (*Client) RESTClient

func (c *Client) RESTClient() simplerest.Interface

func (*Client) ReloadMeshes

func (c *Client) ReloadMeshes()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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