fabric-sdk-go: github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/metrics/cfg Index | Files

package cfg

import "github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/metrics/cfg"


Package Files

config.go opts.go

func IsMetricsConfigFullyOverridden Uses

func IsMetricsConfigFullyOverridden(c *OperationsConfigOptions) bool

IsMetricsConfigFullyOverridden will return true if all of the argument's sub interfaces is not nil (ie MetricsConfig interface not fully overridden)

type MetricConfig Uses

type MetricConfig struct {
    // Provider : statsd, prometheus, or disabled
    Provider string
    // Statsd represents metrics config for Statsd provider
    Statsd Statsd

MetricConfig defines a metric configuration used along the operation system config

type MetricsConfig Uses

type MetricsConfig interface {
    OperationCfg() OperationConfig
    MetricCfg() MetricConfig

MetricsConfig contains operations system and metrics configuration

func BuildConfigMetricsFromOptions Uses

func BuildConfigMetricsFromOptions(opts ...interface{}) (MetricsConfig, error)

BuildConfigMetricsFromOptions will return a MetricsConfig instance pre-built with Optional interfaces provided in fabsdk's WithMetricsConfig(opts...) call

func ConfigFromBackend Uses

func ConfigFromBackend(coreBackend ...core.ConfigBackend) (MetricsConfig, error)

ConfigFromBackend returns identity config implementation of given backend

func UpdateMissingOptsWithDefaultConfig Uses

func UpdateMissingOptsWithDefaultConfig(c *OperationsConfigOptions, d MetricsConfig) MetricsConfig

UpdateMissingOptsWithDefaultConfig will verify if any functions of the MetricsConfig were not updated with fabsdk's WithConfigMetrics(opts...) call, then use default MetricsConfig interface for these functions instead

type MetricsConfigImpl Uses

type MetricsConfigImpl struct {
    // contains filtered or unexported fields

MetricsConfigImpl is the default implementation of MetricsConfig holding config data loaded from backend

func (*MetricsConfigImpl) MetricCfg Uses

func (m *MetricsConfigImpl) MetricCfg() MetricConfig

MetricCfg returns the metrics Config

func (*MetricsConfigImpl) OperationCfg Uses

func (m *MetricsConfigImpl) OperationCfg() OperationConfig

OperationCfg returns the oeprations Config

type OperationConfig Uses

type OperationConfig struct {
    TLSEnabled         bool
    ClientAuthRequired bool
    ListenAddress      string

    // TODO replace TLSCertFile, TLCKeyFile and ClientRootCAs to TLSCACerts (here and in the configs as well)
    TLSCertFile   string
    TLSKeyFile    string
    ClientRootCAs []string

OperationConfig defines an operations system configuration

type OperationsConfigOptions Uses

type OperationsConfigOptions struct {
    // contains filtered or unexported fields

OperationsConfigOptions represents MetricsConfig interface with overridable interface functions if a function is not overridden, the default MetricsConfig implementation will be used.

type Statsd Uses

type Statsd struct {
    // Network is statsd network type: tcp or udp
    Network string

    // Address is statsd server address:
    Address string

    // WriteInterval is the interval at which locally cached counters and gauges are pushed
    // to statsd; timings are pushed immediately
    WriteInterval time.Duration

    // prefix is prepended to all emitted statsd metrics
    Prefix string

Statsd config useful for Statsd metrics provider

Package cfg imports 4 packages (graph) and is imported by 1 packages. Updated 2019-04-03. Refresh now. Tools for package owners.