dqlite

package
v2.0.0-...-6ed2e0c Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseConfig

type DatabaseConfig struct {
	Name    string
	Dir     string
	Url     string
	Join    *[]string
	Verbose bool
	Log     logr.Logger

	CACert       string
	TLSCert      string
	TLSKey       string
	CipherSuites []uint16
	MinVersion   uint16
	// contains filtered or unexported fields
}

func (*DatabaseConfig) Close

func (dc *DatabaseConfig) Close()

Close ensures all responsibilites for the node are handled gracefully on exit

func (*DatabaseConfig) InitDB

func (dc *DatabaseConfig) InitDB(
	cleanUpAfter time.Duration,
) (database.StoredFileStore, error)

InitDB initializes the GORM connection and returns a connected struct

func (*DatabaseConfig) IsLeader

func (dc *DatabaseConfig) IsLeader() (bool, error)

IsLeader returns true if running node is leader

func (*DatabaseConfig) TryMigrate

func (dc *DatabaseConfig) TryMigrate() error

TryMigrate performs database migration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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