facade

package
v0.0.0-...-7570391 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootstrapLogger

func BootstrapLogger()

func DefaultConfigDir

func DefaultConfigDir() string

func FindGCPServiceAccountJSON

func FindGCPServiceAccountJSON(configdir string) string

func GenHostName

func GenHostName() string

func Mkfs

func Mkfs(cfg *Config) error

func Serve

func Serve(ctx context.Context, cfg *Config) error

Types

type ApiServerConfig

type ApiServerConfig struct {
	// API listen addr. Defaults to ":10246".
	ListenAddr string

	// Install debug handlers if enabled.
	EnableDebug bool

	Certs            []*x509.Certificate
	CertsFile        string
	Key              crypto.PrivateKey
	KeyFile          string
	ClientCACert     *x509.Certificate
	ClientCACertFile string `toml:"client_ca_cert_file"`

	WebUIRootPath      string   `toml:"webui_root_path"`
	CORSAllowedOrigins []string `toml:"cors_allowed_origins"`
}

type Config

type Config struct {
	PasswordFile                 string
	ProjectName                  string
	BucketName                   string
	UseSeparateBucketForMetadata bool
	CredentialsFilePath          string

	CacheDir string
	// Cache size high watermark: discard cache when cache dir usage reach here.
	CacheHighWatermarkInBytes int64
	CacheHighWatermark        string
	// Cache size low watermark: when discarding cache, try to reduce cache dir usage under here.
	CacheLowWatermarkInBytes int64
	CacheLowWatermark        string

	ReadOnly   bool
	LocalDebug bool

	Password string

	// If non-empty, perform fuse mount.
	FuseMountPoint string

	// Run GC every "GCPeriod" seconds.
	GCPeriod int64 `toml:"gc_period"`

	Logger    *zap.Logger
	ApiServer ApiServerConfig
}

func NewConfig

func NewConfig(configdir string) (*Config, error)

type Otaru

func (*Otaru) Close

func (o *Otaru) Close() error

func (*Otaru) GetBlobstoreGCTask

func (o *Otaru) GetBlobstoreGCTask(dryrun bool) scheduler.Task

func (*Otaru) GetINodeDBSSGCTask

func (o *Otaru) GetINodeDBSSGCTask(dryrun bool) scheduler.Task

func (*Otaru) GetINodeDBTxLogGCTask

func (o *Otaru) GetINodeDBTxLogGCTask(dryrun bool) scheduler.Task

Jump to

Keyboard shortcuts

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