Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyBucketConfigResult ¶
type ApplyBucketConfigResult struct {
// BucketId is the bucket ID.
BucketId string `json:"bucket_id,omitempty"`
// VolumeId is the volume ID.
VolumeId string `json:"volume_id,omitempty"`
// Error is the error.
Error string `json:"error,omitempty"`
// BucketConf is the curr bucket conf.
BucketConf *Config `json:"bucket_conf,omitempty"`
// OldBucketConf is the old bucket conf.
OldBucketConf *Config `json:"old_bucket_conf,omitempty"`
// Timestamp is the timestamp.
Timestamp time.Time `json:"timestamp"`
// Updated indicates if the value was updated.
Updated bool `json:"updated"`
}
ApplyBucketConfigResult is the JSON marshaler for the response.
func NewApplyBucketConfigResult ¶
func NewApplyBucketConfigResult( ctx context.Context, b bus.Bus, obj *bucket.ApplyBucketConfigResult, ) (*ApplyBucketConfigResult, error)
NewApplyBucketConfigResult builds a new put bucket config response.
func (*ApplyBucketConfigResult) MarshalJSON ¶
func (c *ApplyBucketConfigResult) MarshalJSON() ([]byte, error)
MarshalJSON marshals the result to JSON.
type Config ¶
type Config struct {
// Id is the bucket identifier.
Id string `json:"id"`
// Rev is the configuration version.
Rev uint32 `json:"version"`
// PutOpts contains the put options.
PutOpts *block.PutOpts `json:"putOpts,omitempty"`
// Lookup controls the lookup confiuration.
Lookup *LookupConfig `json:"lookup,omitempty"`
}
Config implements the bucket configuration JSON marshalling logic.
func ParseConfig ¶
ParseConfig parses the bucket config JSON bytes.
func (*Config) MarshalJSON ¶
MarshalJSON marshals the config to JSON.
type LookupConfig ¶
type LookupConfig struct {
// Disble indicates we should not service cross-volume calls against this
// bucket.
Disable bool `json:"disable"`
// Controller is the controller configuration.
Controller *configset_json.ControllerConfig `json:"controller"`
}
LookupConfig implements the lookup configuration JSON marshalling logic.
func NewLookupConfig ¶
func NewLookupConfig(disable bool, config configset.ControllerConfig) *LookupConfig
NewLookupConfig builds a new lookup config.
func (*LookupConfig) GetDisable ¶
func (c *LookupConfig) GetDisable() bool
GetDisable returns the disable field.
type PutOpts ¶
type PutOpts struct {
// Id is the reconciler ID.
Id string `json:"id"`
// Controller is the controller configuration.
Controller *configset_json.ControllerConfig `json:"controller"`
}
PutOpts implements the put options JSON marshalling logic.
func NewPutOpts ¶
func NewPutOpts(id string, config configset.ControllerConfig) *PutOpts
NewPutOpts builds a new controller config.
Click to show internal directories.
Click to hide internal directories.