server

package
v0.104.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 20 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 Simila 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
	// SearchEngine specifies which engine is used for search
	SearchEngine string
	// DB specifies settings for DB used as a full text search engine (e.g. postgres)
	DB *DB
}

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 DB

type DB struct {
	Driver   string
	Host     string
	Port     string
	Username string
	Password string
	DBName   string
	SSLMode  string
}

func (*DB) SourceName

func (d *DB) SourceName() string

func (*DB) URL

func (d *DB) URL() string

Jump to

Keyboard shortcuts

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