Documentation
¶
Index ¶
Constants ¶
const ParamsCounts = 4
Variables ¶
var ErrOSSNoExist = errors.New("oss: key not exist")
var ErrS3NoExist = errors.New("s3: key not exist")
Functions ¶
func NewDBState ¶
func NewDBState() states.StateStorage
Types ¶
type DBState ¶
func (*DBState) ConfigSchema ¶
func (*DBState) GetLatestState ¶
type HTTPState ¶
type HTTPState struct {
// contains filtered or unexported fields
}
HTTPState represent a remote state that can be requested by HTTP. This state is designed to provide a generic way to manipulate State in third-party services
Some url formats are given to bring relative flexibility for third-party services to implement their own State HTTP service and these formats MUST contain 4 "%s" placeholders for tenant, project and stack, since we will replace this format with fmt.Sprintf() Let's get applyURLFormat as an example to demonstrate how this suffix format works.
Example: urlPrefix = "http://kusionstack.io" applyURLFormat = "/apis/v1/tenants/%s/projects/%s/stacks/%s/clusters/%s/states/" tenant = "t" project = "p" stack = "s" cluster = "c" the final request URL = "http://kusionstack.io/apis/v1/tenants/t/projects/p/stacks/s/clusters/c/states"
func NewHTTPState ¶
NewHTTPState builds a new HTTPState with ConfigSchema() and validates params with Configure()
func (*HTTPState) ConfigSchema ¶
ConfigSchema is an implementation of StateStorage.ConfigSchema
func (*HTTPState) GetLatestState ¶
GetLatestState is an implementation of StateStorage.GetLatestState
type OssState ¶
type OssState struct {
// contains filtered or unexported fields
}
func NewOSSState ¶
func (*OssState) ConfigSchema ¶
ConfigSchema returns a description of the expected configuration structure for the receiving backend.
func (*OssState) Configure ¶
Configure uses the provided configuration to set configuration fields within the OssState backend.
func (*OssState) GetLatestState ¶
type S3State ¶
type S3State struct {
// contains filtered or unexported fields
}
func NewS3State ¶
func (*S3State) ConfigSchema ¶
ConfigSchema returns a description of the expected configuration structure for the receiving backend.
func (*S3State) Configure ¶
Configure uses the provided configuration to set configuration fields within the S3State backend.