bcsapi

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicResponse

type BasicResponse struct {
	Code    int             `json:"code"`
	Result  bool            `json:"result"`
	Message string          `json:"message"`
	Data    json.RawMessage `json:"data"`
}

BasicResponse basic http response for bkbcs

type Client

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

Client all module client api composition

func NewClient

func NewClient(config *Config) *Client

NewClient create new bcsapi instance

func (*Client) MesosDriver

func (c *Client) MesosDriver() *MesosDriverCli

MesosDriver client interface

func (*Client) Storage

func (c *Client) Storage() Storage

Storage client interface

func (*Client) UserManager

func (c *Client) UserManager() UserManager

UserManager client interface

type ClusterCredential

type ClusterCredential struct {
	ClusterID     string `json:"clusterId,omitempty"`
	ClusterDomain string `json:"cluster_domain"`
	//kubernetes api-server addresses, splited by comma
	ServerAddresses string `json:"server_addresses"`
	UserToken       string `json:"user_token"`
}

ClusterCredential holds one kubernetes api-server connection credential

type Config

type Config struct {
	//bcsapi host, available like 127.0.0.1:8080
	//todo(DeveloperJim): make it slice when discovery mechanism change to etcd
	Hosts []string
	//tls configuratio
	TLSConfig *tls.Config
	//AuthToken for permission verification
	AuthToken string
	//clusterID for Kubernetes/Mesos operation
	ClusterID string
	//proxy flag for go through bcs-api-gateway
	Gateway bool
}

Config for bcsapi

type MesosDriver

type MesosDriver interface {
}

MesosDriver http API SDK definition

type MesosDriverCli

type MesosDriverCli struct {
	Config *Config
	Client restclient.RESTClient
}

MesosDriverCli client implementation for bcs-mesos-driver

type Storage

type Storage interface {
	// search all taskgroup by clusterID
	QueryMesosTaskgroup(cluster string) ([]*storage.Taskgroup, error)
	// query all pod information in specified cluster
	QueryK8SPod(cluster string) ([]*storage.Pod, error)
	// GetIPPoolDetailInfo get all underlay ip information
	GetIPPoolDetailInfo(clusterID string) ([]*storage.IPPool, error)
}

Storage interface definition for bcs-storage

func NewStorage

func NewStorage(config *Config) Storage

NewStorage create bcs-storage api implementation

type StorageCli

type StorageCli struct {
	Config *Config
	Client *restclient.RESTClient
}

StorageCli bcsf-storage client implementation

func (*StorageCli) GetIPPoolDetailInfo

func (c *StorageCli) GetIPPoolDetailInfo(clusterID string) ([]*storage.IPPool, error)

GetIPPoolDetailInfo get all underlay ip information

func (*StorageCli) QueryK8SPod

func (c *StorageCli) QueryK8SPod(cluster string) ([]*storage.Pod, error)

QueryK8SPod query all pod information in specified cluster

func (*StorageCli) QueryMesosTaskgroup

func (c *StorageCli) QueryMesosTaskgroup(cluster string) ([]*storage.Taskgroup, error)

QueryMesosTaskgroup search all taskgroup by clusterID

type UserManager

type UserManager interface {
	// ListAllClusters get all registed kubernetes api-server
	ListAllClusters() ([]*ClusterCredential, error)
}

UserManager http API SDK difinition

func NewUserManager

func NewUserManager(config *Config) UserManager

NewUserManager create UserManager SDK implementation

type UserManagerCli

type UserManagerCli struct {
	Config *Config
	Client *restclient.RESTClient
}

UserManagerCli client for bcs-user-manager

func (*UserManagerCli) ListAllClusters

func (cli *UserManagerCli) ListAllClusters() ([]*ClusterCredential, error)

ListAllClusters get all registed kubernetes api-server

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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