config

package
v0.3.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package config provides configuration for GRPC and HTTP api servers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	StartGrpcServices   []string `mapstructure:"grpc"`
	GrpcServerPort      int      `mapstructure:"grpc-port"`
	GrpcServerInterface string   `mapstructure:"grpc-interface"`
	// GRPC send and receive buffer size
	GrpcSendMsgSize int `mapstructure:"grpc-send-msg-size"`
	GrpcRecvMsgSize int `mapstructure:"grpc-recv-msg-size"`

	StartJSONServer bool `mapstructure:"json-server"`
	JSONServerPort  int  `mapstructure:"json-port"`
	// no direct command line flags for these
	StartDebugService       bool
	StartGlobalStateService bool
	StartMeshService        bool
	StartNodeService        bool
	StartSmesherService     bool
	StartTransactionService bool
	StartActivationService  bool

	SmesherStreamInterval time.Duration
}

Config defines the api config params.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig defines the default configuration options for api.

func DefaultTestConfig

func DefaultTestConfig() Config

DefaultTestConfig returns the default config for tests.

func (*Config) ParseServicesList added in v0.1.15

func (s *Config) ParseServicesList() error

ParseServicesList enables the requested services.

Jump to

Keyboard shortcuts

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