config

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: AGPL-3.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceSchema

type DeviceSchema struct {
	Name          string        `hcl:"name,label"`
	Size          string        `hcl:"size,attr"`
	System        string        `hcl:"system,attr"`
	BlockSize     string        `hcl:"blocksize,optional"`
	Expose        bool          `hcl:"expose,optional"`
	Location      string        `hcl:"location,optional"`
	ROSource      *DeviceSchema `hcl:"source,block"`
	Binlog        string        `hcl:"binlog,optional"`
	PageServerPID int           `hcl:"pid,optional"`
	Sync          *SyncS3Schema `hcl:"sync,block"`
}

func (*DeviceSchema) ByteBlockSize added in v0.0.3

func (ds *DeviceSchema) ByteBlockSize() int64

func (*DeviceSchema) ByteSize

func (ds *DeviceSchema) ByteSize() int64

func (*DeviceSchema) Decode added in v0.0.6

func (ds *DeviceSchema) Decode(schema string) error

func (*DeviceSchema) Encode added in v0.0.6

func (ds *DeviceSchema) Encode() []byte

type SiloSchema

type SiloSchema struct {
	Device []*DeviceSchema `hcl:"device,block"`
}

func ReadSchema

func ReadSchema(path string) (*SiloSchema, error)

func (*SiloSchema) Decode

func (s *SiloSchema) Decode(data []byte) error

func (*SiloSchema) Encode

func (s *SiloSchema) Encode() ([]byte, error)

type SyncConfigSchema added in v0.0.10

type SyncConfigSchema struct {
	OnlyDirty   bool   `hcl:"onlydirty,attr"`
	BlockShift  int    `hcl:"blockshift,attr"`
	MaxAge      string `hcl:"maxage,attr"`
	MinChanged  int    `hcl:"minchanged,attr"`
	CheckPeriod string `hcl:"checkperiod,attr"`
	Limit       int    `hcl:"limit,attr"`
}

type SyncS3Schema added in v0.0.10

type SyncS3Schema struct {
	Secure    bool              `hcl:"secure,attr"`
	AccessKey string            `hcl:"accesskey,attr"`
	SecretKey string            `hcl:"secretkey,attr"`
	Endpoint  string            `hcl:"endpoint,attr"`
	Bucket    string            `hcl:"bucket,attr"`
	Config    *SyncConfigSchema `hcl:"config,block"`
	AutoStart bool              `hcl:"autostart,attr"`
}

Jump to

Keyboard shortcuts

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