config.go 1.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
package config

type Config struct {
	// Root is the path to a directory where epm will store cache data
	Root string `toml:"root"`
	// GRPC configuration settings
	GRPC GRPCConfig `toml:"grpc"`
	// DBPath is the path of a database file
	DBPath string `toml:"db_path"`
	// DBTimeout is the amount of time to wait to obtain a database file lock.
	DBTimeout int `toml:"db_timeout"`
J
jiazhiguang 已提交
12 13
	// EnclavePools stores the configurations of enclave pool
	EnclavePools map[string]EnclavePoolConfiguration `toml:"pools"`
14 15 16 17 18 19 20 21 22 23 24 25 26 27
}

// GRPCConfig provides GRPC configuration for the socket
type GRPCConfig struct {
	Address        string `toml:"address"`
	TCPAddress     string `toml:"tcp_address"`
	TCPTLSCert     string `toml:"tcp_tls_cert"`
	TCPTLSKey      string `toml:"tcp_tls_key"`
	UID            int    `toml:"uid"`
	GID            int    `toml:"gid"`
	MaxRecvMsgSize int    `toml:"max_recv_message_size"`
	MaxSendMsgSize int    `toml:"max_send_message_size"`
}

J
jiazhiguang 已提交
28 29
// EnclavePoolConfiguration provides the configuration for the enclave pool
type EnclavePoolConfiguration struct {
30 31
	Type string `toml:"type"`
}