Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Which ip to bind to
BindIp string `json:"bind_ip"`
// Which port to bind to
BindPort int `json:"bind_port" required:"true"`
// Certificate file in order to enable TLS
Certificate string `json:"certificate" required:"true"`
// Certificate's private key
CertificateKey string `json:"certificate_key" required:"true"`
// Directory containing all the appropriate files to load the CA
CertificateAuthoritiesDir string `json:"certificate_authorities_dir" required:"true"`
// token for ams interaction
AmsToken string `json:"ams_token" required:"true"`
// Ams endpoint
AmsHost string `json:"ams_host" required:"true"`
// Ams port
AmsPort int `json:"ams_port" required:"true"`
// Whether any http client spawn inside the service should accept to talk to non https connections
VerifySSL bool `json:"verify_ssl"`
// whether the service will start with tls enabled
TLSEnabled bool `json:"tls_enabled"`
// Trust incoming certificates signed from unknown CAs
TrustUnknownCAs bool `json:"trust_unknown_cas"`
// log level(DEBUG,INFO,WARNING,ERROR)
LogLevel string `json:"log_level" required:"true"`
// whether or not it should try to load any push enabled subscriptions, upon starting up
SkipSubsLoad bool `json:"skip_subs_load"`
// list of certificate DNs that should be allowed to access the service
ACL []string `json:"acl"`
// Enable direct logging of the service to the syslog facility
SyslogEnabled bool `json:"syslog_enabled"`
// contains filtered or unexported fields
}
Config contains all the needed information for the server to function properly
func NewMockConfig ¶
func NewMockConfig() *Config
NewMockConfig returns a config to be used in tests
func (*Config) GetClientAuthType ¶
func (cfg *Config) GetClientAuthType() tls.ClientAuthType
GetClientAuthType returns which client auth strategy should the server follow when validating a certificate
func (*Config) GetLogLevel ¶
GetLogLevel maps the provided string log level inside the config to a log.Level if it can't map it, it will return log.LevelInfo
func (*Config) GetTLSConfig ¶
GetTLSConfig returns the tls configuration needed for the grpc server
Click to show internal directories.
Click to hide internal directories.