...

Package operations

import "github.com/hyperledger/fabric-ca/lib/server/operations"
Overview
Index

Overview ▾

Variables

var (
    // DefaultTLSCipherSuites is the list of default cipher suites
    DefaultTLSCipherSuites = []uint16{
        tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
        tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
        tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
        tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
        tls.TLS_RSA_WITH_AES_128_GCM_SHA256,
        tls.TLS_RSA_WITH_AES_256_GCM_SHA384,
    }
)

type MetricsOptions

MetricsOptions contains the information on providers

type MetricsOptions struct {
    Provider string
    Statsd   *Statsd
}

type Options

Options contains configuration for the operations system

type Options struct {
    ListenAddress string
    Metrics       MetricsOptions
    TLS           TLS
}

type Statsd

Statsd contains configuration of statsd

type Statsd struct {
    Network       string
    Address       string
    WriteInterval time.Duration
    Prefix        string
}

type System

System is an operations server that is responsible for metrics and health checks

type System struct {
    metrics.Provider
    // contains filtered or unexported fields
}

func NewSystem

func NewSystem(o Options) *System

NewSystem creates a System struct

func (*System) Addr

func (s *System) Addr() string

Addr returns the address of the listener

func (*System) Log

func (s *System) Log(keyvals ...interface{}) error

Log is a function required to meet the interface required by statsd

func (*System) RegisterChecker

func (s *System) RegisterChecker(component string, checker healthz.HealthChecker) error

RegisterChecker registers the HealthCheck with Healthchecker server

func (*System) Start

func (s *System) Start() error

Start starts the operations system server

func (*System) Stop

func (s *System) Stop() error

Stop stop the operations system server

type TLS

TLS contains the TLS configuration for the operations system serve

type TLS struct {
    Enabled            bool
    CertFile           string
    KeyFile            string
    ClientCertRequired bool
    ClientCACertFiles  []string
}

func (*TLS) Config

func (t *TLS) Config() (*tls.Config, error)

Config returns TLS configuration