server

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

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

Run is an entry point of the Solaris server

Types

type Config

type Config struct {
	// GrpcTransport specifies grpc transport configuration
	GrpcTransport *transport.Config
	// HttpPort defines the port for listening incoming HTTP connections
	HttpPort int
	// DB specifies DBConn for storing the logs and chunks metadata
	DB *DBConn
	// LocalDBFilePath specifies where the logs data is stored
	LocalDBFilePath string
	// MaxOpenedLogFiles allows to control number of files opened at a time to work with the solaris data
	// Increasing the number allows to increase the system performance for accessing to random group of logs
	MaxOpenedLogFiles int
}

Config defines the scaffolding-golang server configuration

func BuildConfig

func BuildConfig(cfgFile string) (*Config, error)

func (*Config) String

func (c *Config) String() string

String implements fmt.Stringify interface in a pretty console form

type DBConn added in v0.17.0

type DBConn struct {
	// Driver is the db driver (e.g. postgres)
	Driver string
	// Host is the host address where the db reside
	Host string
	// Port is the port on which the db is listening for connections
	Port string
	// Username is the username for authc/z against the db
	Username string
	// Password is the password for authc/z against the db
	Password string
	// DBName is the name of the db to connect to
	DBName string
	// SSLMode is the SSL mode to use
	SSLMode string
}

DBConn represents database connection parameters

func (*DBConn) SourceName added in v0.17.0

func (d *DBConn) SourceName() string

SourceName returns the DSN for the connection

func (*DBConn) URL added in v0.17.0

func (d *DBConn) URL() string

URL returns the URL for the connection

Jump to

Keyboard shortcuts

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