Documentation
¶
Index ¶
- Variables
- func CreateTempConfigFromTemplate(t *testing.T, cmdTemplate string, conf *SystemConfig) string
- func NewViperWithCoordinatorDefaults() *viper.Viper
- func NewViperWithLoadGenDefaults() *viper.Viper
- func NewViperWithLoggingDefault() *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, error)
- func ReadLoadGenYamlAndSetupLogging(v *viper.Viper, configPath string) (*loadgen.ClientConfig, error)
- func ReadMockOrdererYamlAndSetupLogging(v *viper.Viper, configPath string) (*mock.OrdererConfig, error)
- func ReadQueryYamlAndSetupLogging(v *viper.Viper, configPath string) (*query.Config, error)
- func ReadSidecarYamlAndSetupLogging(v *viper.Viper, configPath string) (*sidecar.Config, error)
- func ReadVCYamlAndSetupLogging(v *viper.Viper, configPath string) (*vc.Config, error)
- func ReadVerifierYamlAndSetupLogging(v *viper.Viper, configPath string) (*verifier.Config, error)
- func ReadYamlAndSetupLogging(v *viper.Viper, configPath, servicePrefix string, c any) error
- type DatabaseConfig
- type ServiceConfig
- type SystemConfig
- type SystemServices
Constants ¶
This section is empty.
Variables ¶
var ( //go:embed templates/coordinator.yaml TemplateCoordinator string //go:embed templates/mock-orderer.yaml TemplateMockOrderer string //go:embed templates/query.yaml TemplateQueryService string //go:embed templates/sidecar.yaml TemplateSidecar string //go:embed templates/vc.yaml TemplateVC string //go:embed templates/verifier.yaml TemplateVerifier string TemplateLoadGenOnlyOrderer = templateLoadGenOnlyOrdererClient + templateLoadGenCommon TemplateLoadGenOrderer = templateLoadGenOrdererClient + templateLoadGenCommon TemplateLoadGenCommitter = templateLoadGenCommitterClient + templateLoadGenCommon TemplateLoadGenCoordinator = templateLoadGenCoordinatorClient + templateLoadGenCommon TemplateLoadGenVC = templateLoadGenVCClient + templateLoadGenCommon TemplateLoadGenVerifier = templateLoadGenVerifierClient + templateLoadGenCommon TemplateLoadGenDistributedLoadGenClient = templateLoadGenDistributedLoadGenClient + templateLoadGenCommon )
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 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, error)
ReadCoordinatorYamlAndSetupLogging reading the YAML config file of the coordinator.
func ReadLoadGenYamlAndSetupLogging ¶
func ReadLoadGenYamlAndSetupLogging(v *viper.Viper, configPath string) (*loadgen.ClientConfig, error)
ReadLoadGenYamlAndSetupLogging reading the YAML config file of the load generator.
func ReadMockOrdererYamlAndSetupLogging ¶
func ReadMockOrdererYamlAndSetupLogging(v *viper.Viper, configPath string) (*mock.OrdererConfig, error)
ReadMockOrdererYamlAndSetupLogging reading the YAML config file of the mock ordering service.
func ReadQueryYamlAndSetupLogging ¶
ReadQueryYamlAndSetupLogging reading the YAML config file of the query service.
func ReadSidecarYamlAndSetupLogging ¶
ReadSidecarYamlAndSetupLogging reading the YAML config file of the sidecar.
func ReadVCYamlAndSetupLogging ¶
ReadVCYamlAndSetupLogging reading the YAML config file of the VC.
func ReadVerifierYamlAndSetupLogging ¶
ReadVerifierYamlAndSetupLogging reading the YAML config file of the verifier.
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
MetricsEndpoint *connection.Endpoint
GrpcTLS connection.TLSConfig
MetricsTLS 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 *connection.RateLimitConfig // query, sidecar
MaxRequestKeys int // 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.