biz

package
v0.0.0-...-dc06bc9 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 19 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEtcdClientNotReady = errors.New("etcd client not ready")
)

ProviderSet is biz providers.

Functions

This section is empty.

Types

type CRIUsecase

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

docker / cri info.

features - list container - check container health - report container info to mallard2-agent

func NewCRIUsecase

func NewCRIUsecase(logger log.Logger) *CRIUsecase

type Cluster

type Cluster struct {
	Name    string           `json:"name"`    // 集群名称
	Healthy bool             `json:"healthy"` // 是否健康
	Members []*ClusterMember `json:"members"` // 集群成员
}

type ClusterMember

type ClusterMember struct {
	ID         uint64   `json:"id"`
	Name       string   `json:"name"`
	PeerURLs   []string `json:"peer_urls"`
	ClientURLs []string `json:"client_urls"`
	IsLearner  bool     `json:"is_learner"`
}

type ClusterMicroservice

type ClusterMicroservice struct {
	Name     string          `json:"name"`
	Services []*Microservice `json:"services"`
}

type ClusterUsecase

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

func NewClusterUsecase

func NewClusterUsecase(logger log.Logger, clis []*cluster.Client, c *conf.Bootstrap) *ClusterUsecase

func (*ClusterUsecase) GetClusters

func (r *ClusterUsecase) GetClusters(ctx context.Context) ([]*Cluster, error)

func (*ClusterUsecase) GetServices

func (r *ClusterUsecase) GetServices(ctx context.Context) ([]*ClusterMicroservice, error)

func (*ClusterUsecase) GetValue

func (r *ClusterUsecase) GetValue(ctx context.Context, cluster string, key string) string

func (*ClusterUsecase) Keys

func (r *ClusterUsecase) Keys(ctx context.Context, clusterName string) map[string][]string

func (*ClusterUsecase) Ping

func (r *ClusterUsecase) Ping(_ context.Context) error

type CrontabUsecase

type CrontabUsecase struct{}

func NewCrontabUsecase

func NewCrontabUsecase() *CrontabUsecase

type KVUsecase

type KVUsecase struct {
}

type Microservice

type Microservice struct {
	Key       string            `json:"key"`
	ID        string            `json:"id"`
	Name      string            `json:"name"`
	Version   string            `json:"version"`
	Metadata  map[string]string `json:"metadata"`
	Endpoints []string          `json:"endpoints"`
	CreatedAt int64             `json:"created_at"`
}

Jump to

Keyboard shortcuts

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