config

package
v1.28.0-alpha.30 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package config xxx

Index

Constants

View Source
const (
	// TaskManagerTypePaas paas cc type task manager
	TaskManagerTypePaas = "paas"
	// TaskManagerTypeFile file type task manager
	TaskManagerTypeFile = "file"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncOption

type SyncOption struct {

	// configs for synchronizer server
	conf.ServiceConfig
	conf.CertConfig
	conf.MetricConfig
	conf.LogConfig
	conf.FileConfig
	ZkAddr string `json:"zk" value:"127.0.0.1:2181" usage:"zk address"`

	// configs for bcs storage
	StorageZk   string `json:"storage_zk" value:"127.0.0.1:2181" usage:"zk for bcs storage"`
	StorageCa   string `json:"storage_ca" value:"" usage:"ca cert for bcs storage"`
	StorageKey  string `json:"storage_key" value:"" usage:"key file for bcs storage"`
	StorageCert string `json:"storage_cert" value:"" usage:"cert file for bcs storage"`

	// configs for cmdb
	CmdbAddr       string `json:"cmdb_addr" value:"" usage:"cmdb address"`
	CmdbSupplierID string `json:"cmdb_supplier_id" value:"0" usage:"bk supplier id"`
	CmdbUser       string `json:"cmdb_user" value:"" usage:"bk_user for cmdb"`

	// configs for paas
	PaasAddr       string `json:"paas_addr" value:"" usage:"bk paas address"`
	PaasEnv        string `json:"paas_env" value:"" usage:"bk paas environment, optional [test, prod, debug, uat]"`
	PaasClusterEnv string `json:"paas_cluster_env" value:"" usage:"bcs cluster env in bk paas, optional [debug, prod]"`
	PaasAppCode    string `json:"paas_app_code" value:"" usage:"app code for bk paas"`
	PaasAppSecret  string `json:"paas_app_secret" value:"" usage:"app code for bk paas"`
	// interval for discover clusters
	ClusterPullInterval int64 `json:"cluster_pull_interval" value:"600" usage:"interval for discover clusters, seconds"`
	// interval for do full sync
	FullSyncInterval int64 `json:"full_sync_interval" value:"600" usage:"full sync interval, seconds"`

	// TaskManagerType task manager type
	TaskManagerType string `json:"task_manager_type" value:"paas" usage:"task manager type"`

	// TaskFile task file
	TaskFile string `json:"task_file" value:"" usage:"task file, only for file type task manager"`
}

SyncOption sync option

func (*SyncOption) Load

func (so *SyncOption) Load()

Load load from config file or command line

func (*SyncOption) Validate

func (so *SyncOption) Validate() (bool, string)

Validate validate config

Jump to

Keyboard shortcuts

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