apiclient

package
v0.5.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClusterNotFound = stderr.New("can not find cluster")
)

Functions

func Init

func Init(clusterMg controls.ClusterManager)

func Stop

func Stop()

Types

type DeltaResources

type DeltaResources struct {
	NewResources    []*ProtoAny
	RemovedResource []string
}

type GRPCCluster

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

func (*GRPCCluster) Close

func (g *GRPCCluster) Close() error

func (*GRPCCluster) GetConnection

func (g *GRPCCluster) GetConnection() (conn *grpc.ClientConn, err error)

func (*GRPCCluster) IsAlive

func (g *GRPCCluster) IsAlive() bool

type GRPCClusterManager

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

func (*GRPCClusterManager) Close

func (g *GRPCClusterManager) Close() (err error)

func (*GRPCClusterManager) GetGrpcCluster

func (g *GRPCClusterManager) GetGrpcCluster(name string) (*GRPCCluster, error)

GetGrpcCluster get the cluster or create it first time.

type GrpcApiClient

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

func CreateGrpcApiClient

func CreateGrpcApiClient(config *model.ApiConfigSource, node *model.Node,
	exitCh chan struct{},
	typeNames ...ResourceTypeName) *GrpcApiClient

CreateGrpcApiClient create Grpc type ApiClient

func (*GrpcApiClient) Delta

func (g *GrpcApiClient) Delta() (chan *DeltaResources, error)

func (*GrpcApiClient) Fetch

func (g *GrpcApiClient) Fetch(localVersion string) ([]*ProtoAny, error)

Fetch get config data from discovery service and return Any type.

type PixiuDynamicConfigModel

type PixiuDynamicConfigModel proto.Message

type ProtoAny

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

func NewProtoAny

func NewProtoAny(typeConfig *v3.TypedExtensionConfig) *ProtoAny

func (*ProtoAny) GetName

func (p *ProtoAny) GetName() string

func (*ProtoAny) To

func (p *ProtoAny) To(configModel PixiuDynamicConfigModel) error

type ResourceTypeName

type ResourceTypeName = string

Jump to

Keyboard shortcuts

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