modules

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModuleConfig

type ModuleConfig struct {
	ListenAddress string `mapstructure:"listen_addr"`

	// RegisterAddress is address others can find this module
	// In some environment, especially in cloud, listen address and register address are different
	// It will use listen address if register address is empty
	RegisterAddress string `mapstructure:"register_addr"`

	// Metadata that should be saved in etcd
	//
	// grpc resolver is used to save address and metadata to etcd. Due to current implementation
	// in grpc and etcd, metadata is used as key of map, so metadata can not be type that can not
	// be hashed, such as map. If you want to store complex metadata, consider store it as marshalled
	// json string. This constrain may be relaxed in future version of grpc
	Metadata interface{}

	// EnableTLS enable tls for this module
	EnableTLS bool `mapstructure:"enable_tls"`

	// CAFile is root cert file path
	//  combined use with EnableClientAuth
	// Deprecated: use ClientCAFile instead
	CAFile string `mapstructure:"ca_file"`

	// CertFile is cert file path
	CertFile string `mapstructure:"cert_file"`

	// KeyFile is key file path
	KeyFile string `mapstructure:"key_file"`

	// EnableClientAuth enable tls bot authentication support at server
	//  ref to https://blog.cloudflare.com/introducing-tls-client-auth/
	EnableClientAuth bool `mapstructure:"enable_client_auth"`

	// ClientCAFile is ca file path
	//  that servers use if required to verify a bot certificate
	//  combined use with EnableClientAuth
	ClientCAFile string `mapstructure:"client_ca_file"`
}

Directories

Path Synopsis
proto
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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