config

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: AGPL-3.0 Imports: 9 Imported by: 5

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"`
	ROSourceShared bool          `hcl:"sourceshared,optional"`
	Binlog         string        `hcl:"binlog,optional"`
	PageServerPID  int           `hcl:"pid,optional"`
	Sync           *SyncS3Schema `hcl:"sync,block"`
}

func DecodeDeviceFromBlock added in v0.1.6

func DecodeDeviceFromBlock(schema string) (*DeviceSchema, error)

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

func (*DeviceSchema) EncodeAsBlock added in v0.1.6

func (ds *DeviceSchema) EncodeAsBlock() []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"`
	Concurrency int    `hcl:"concurrency,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"`
	Prefix          string            `hcl:"prefix,optional"`
	GrabPrefix      string            `hcl:"grabprefix,optional"`
	Config          *SyncConfigSchema `hcl:"config,block"`
	AutoStart       bool              `hcl:"autostart,attr"`
	GrabConcurrency int               `hcl:"grabconcurrency,attr"`
}

Jump to

Keyboard shortcuts

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