Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackendFromConfig ¶
func BackendFromConfig(config *Storage, override BackendOps, dir string) (states.StateStorage, error)
BackendFromConfig return stateStorage, this func handler backend config merge and configure backend. return a StateStorage to manage State
func MergeConfig ¶
MergeConfig merge project backend config and cli backend config
Types ¶
type BackendOps ¶
type BackendOps struct { // Config is a series of backend configurations, // such as ["path=kusion_state.json"] Config []string // Type is the type of backend, currently supported: // local - state is stored to a local file // db - state is stored to db // oss - state is stored to aliyun oss // s3 - state is stored to aws s3 Type string }
BackendOps kusion cli backend override config
func (*BackendOps) AddBackendFlags ¶
func (o *BackendOps) AddBackendFlags(cmd *cobra.Command)
type Storage ¶
type Storage struct { Type string `json:"storageType,omitempty" yaml:"storageType,omitempty"` Config map[string]interface{} `json:"config,omitempty" yaml:"config,omitempty"` }
backend config state storage type
func NewDefaultBackend ¶
NewDefaultBackend return default backend, default backend is local filesystem
Click to show internal directories.
Click to hide internal directories.