Documentation
¶
Index ¶
- Variables
- func CreateTempConfigFromTemplate(t *testing.T, cmdTemplate string, conf *SystemConfig) string
- func NewViperWithCoordinatorDefaults() *viper.Viper
- func NewViperWithLoadGenDefaults() *viper.Viper
- func NewViperWithLoggingDefault(serviceName string) *viper.Viper
- func NewViperWithOrdererDefaults() *viper.Viper
- func NewViperWithQueryDefaults() *viper.Viper
- func NewViperWithSidecarDefaults() *viper.Viper
- func NewViperWithVCDefaults() *viper.Viper
- func NewViperWithVerifierDefaults() *viper.Viper
- func ReadCoordinatorYamlAndSetupLogging(v *viper.Viper, configPath string) (*coordinator.Config, *serve.Config, error)
- func ReadLoadGenYamlAndSetupLogging(v *viper.Viper, configPath string) (*loadgen.ClientConfig, *serve.Config, error)
- func ReadMockOrdererYamlAndSetupLogging(v *viper.Viper, configPath string) (*mock.OrdererConfig, *serve.Config, error)
- func ReadQueryYamlAndSetupLogging(v *viper.Viper, configPath string) (*query.Config, *serve.Config, error)
- func ReadSidecarYamlAndSetupLogging(v *viper.Viper, configPath string) (*sidecar.Config, *serve.Config, error)
- func ReadVCYamlAndSetupLogging(v *viper.Viper, configPath string) (*vc.Config, *serve.Config, error)
- func ReadVerifierYamlAndSetupLogging(v *viper.Viper, configPath string) (*verifier.Config, *serve.Config, error)
- type DatabaseConfig
- type ServiceConfig
- type SystemConfig
- type SystemServices
Constants ¶
This section is empty.
Variables ¶
var ( //go:embed templates/coordinator.yaml.tmpl TemplateCoordinator string //go:embed templates/mock-orderer.yaml.tmpl TemplateMockOrderer string //go:embed templates/query.yaml.tmpl TemplateQueryService string //go:embed templates/sidecar.yaml.tmpl TemplateSidecar string //go:embed templates/vc.yaml.tmpl TemplateVC string //go:embed templates/verifier.yaml.tmpl TemplateVerifier string //go:embed templates/loadgen_only_orderer.yaml.tmpl TemplateLoadGenOnlyOrderer string //go:embed templates/loadgen_orderer.yaml.tmpl TemplateLoadGenOrderer string //go:embed templates/loadgen_committer.yaml.tmpl TemplateLoadGenCommitter string //go:embed templates/loadgen_coordinator.yaml.tmpl TemplateLoadGenCoordinator string //go:embed templates/loadgen_vc.yaml.tmpl TemplateLoadGenVC string //go:embed templates/loadgen_verifier.yaml.tmpl TemplateLoadGenVerifier string //go:embed templates/loadgen_distributed.yaml.tmpl TemplateLoadGenDistributedLoadGenClient string )
Config templates.
Functions ¶
func CreateTempConfigFromTemplate ¶
func CreateTempConfigFromTemplate(t *testing.T, cmdTemplate string, conf *SystemConfig) string
CreateTempConfigFromTemplate creates a temporary config file and returning the temporary output config path.
func NewViperWithCoordinatorDefaults ¶
NewViperWithCoordinatorDefaults returns a viper instance with the coordinator default values.
func NewViperWithLoadGenDefaults ¶
NewViperWithLoadGenDefaults returns a viper instance with the load generator default values.
func NewViperWithLoggingDefault ¶
NewViperWithLoggingDefault returns a viper instance with the logging default values.
func NewViperWithOrdererDefaults ¶ added in v1.0.0
NewViperWithOrdererDefaults returns a viper instance with the mock-orderer service default values.
func NewViperWithQueryDefaults ¶
NewViperWithQueryDefaults returns a viper instance with the query-service default values.
func NewViperWithSidecarDefaults ¶
NewViperWithSidecarDefaults returns a viper instance with the sidecar default values.
func NewViperWithVCDefaults ¶
NewViperWithVCDefaults returns a viper instance with the VC default values.
func NewViperWithVerifierDefaults ¶
NewViperWithVerifierDefaults returns a viper instance with the verifier default values.
func ReadCoordinatorYamlAndSetupLogging ¶
func ReadCoordinatorYamlAndSetupLogging( v *viper.Viper, configPath string, ) (*coordinator.Config, *serve.Config, error)
ReadCoordinatorYamlAndSetupLogging reading the YAML config file of the coordinator.
func ReadLoadGenYamlAndSetupLogging ¶
func ReadLoadGenYamlAndSetupLogging( v *viper.Viper, configPath string, ) (*loadgen.ClientConfig, *serve.Config, error)
ReadLoadGenYamlAndSetupLogging reading the YAML config file of the load generator.
func ReadMockOrdererYamlAndSetupLogging ¶
func ReadMockOrdererYamlAndSetupLogging( v *viper.Viper, configPath string, ) (*mock.OrdererConfig, *serve.Config, error)
ReadMockOrdererYamlAndSetupLogging reading the YAML config file of the mock ordering service.
func ReadQueryYamlAndSetupLogging ¶
func ReadQueryYamlAndSetupLogging(v *viper.Viper, configPath string) (*query.Config, *serve.Config, error)
ReadQueryYamlAndSetupLogging reading the YAML config file of the query service.
func ReadSidecarYamlAndSetupLogging ¶
func ReadSidecarYamlAndSetupLogging( v *viper.Viper, configPath string, ) (*sidecar.Config, *serve.Config, error)
ReadSidecarYamlAndSetupLogging reading the YAML config file of the sidecar.
Types ¶
type DatabaseConfig ¶
type DatabaseConfig struct {
Name string
Username string
Password string
LoadBalance bool
Endpoints []*connection.Endpoint
TLS dbconn.DatabaseTLSConfig
}
DatabaseConfig represents the used DB.
type ServiceConfig ¶ added in v0.1.9
type ServiceConfig struct {
GrpcEndpoint *connection.Endpoint
HTTPEndpoint *connection.Endpoint
GrpcTLS connection.TLSConfig
HTTPTLS connection.TLSConfig
}
ServiceConfig stores the service's server and metrics endpoints, along with their TLS configuration.
type SystemConfig ¶
type SystemConfig struct {
// ThisService holds the configuration for the current service instance being configured.
// This is populated at runtime with the specific service's endpoints and TLS settings.
ThisService ServiceConfig
// ClientTLS holds the TLS configuration used by a service when acting as a client to other services.
ClientTLS connection.TLSConfig
// System's resources.
Services SystemServices
DB DatabaseConfig
// Per service configurations.
BlockSize uint64 // orderer, loadgen
BlockTimeout time.Duration // orderer
LedgerPath string // sidecar
Policy *workload.PolicyProfile // loadgen
LoadGenBlockLimit uint64 // loadgen
LoadGenTXLimit uint64 // loadgen
LoadGenWorkers uint64 // loadgen
Logging flogging.Config // for all
RateLimit *serve.RateLimitConfig // query, sidecar
MaxRequestKeys int // query
QueryTLSRefreshInterval time.Duration // query
MaxConcurrentStreams int // sidecar
// VC service batching configuration (for testing).
VCMinTransactionBatchSize int // vc
VCTimeoutForMinTransactionBatchSize time.Duration // vc
// Verifier batching configuration (for testing).
VerifierBatchTimeCutoff time.Duration // verifier
VerifierBatchSizeCutoff int // verifier
}
SystemConfig represents the configuration of the one of the committer's components.
type SystemServices ¶ added in v0.1.9
type SystemServices struct {
Verifier []ServiceConfig
VCService []ServiceConfig
Orderer []ServiceConfig
Coordinator ServiceConfig
Sidecar ServiceConfig
Query ServiceConfig
LoadGen ServiceConfig
}
SystemServices holds all configurations for the system services.