config

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	GenericDriver = "generic"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BCCSP

type BCCSP struct {
	Default string            `yaml:"Default,omitempty"`
	SW      *SoftwareProvider `yaml:"SW,omitempty"`
	PKCS11  *PKCS11           `yaml:"PKCS11,omitempty"`
}

type Chaincode

type Chaincode struct {
	Name    string `yaml:"Name,omitempty"`
	Private bool   `yaml:"Private,omitempty"`
}

func (Chaincode) ID added in v0.4.0

func (c Chaincode) ID() string

func (Chaincode) IsPrivate added in v0.4.0

func (c Chaincode) IsPrivate() bool

type Channel

type Channel struct {
	Name       string        `yaml:"Name,omitempty"`
	Default    bool          `yaml:"Default,omitempty"`
	Quiet      bool          `yaml:"Quiet,omitempty"`
	NumRetries uint          `yaml:"NumRetries,omitempty"`
	RetrySleep time.Duration `yaml:"RetrySleep,omitempty"`
	Finality   Finality      `yaml:"Finality,omitempty"`
	Committer  Committer     `yaml:"Committer,omitempty"`
	Delivery   Delivery      `yaml:"Delivery,omitempty"`
	Discovery  Discovery     `yaml:"Discovery,omitempty"`
	Chaincodes []*Chaincode  `yaml:"Chaincodes,omitempty"`
}

func (*Channel) ChaincodeConfigs added in v0.4.0

func (c *Channel) ChaincodeConfigs() []driver.ChaincodeConfig

func (*Channel) CommitParallelism added in v0.4.0

func (c *Channel) CommitParallelism() int

func (*Channel) CommitterFinalityNumRetries added in v0.4.0

func (c *Channel) CommitterFinalityNumRetries() int

func (*Channel) CommitterFinalityUnknownTXTimeout added in v0.4.0

func (c *Channel) CommitterFinalityUnknownTXTimeout() time.Duration

func (*Channel) CommitterPollingTimeout added in v0.4.0

func (c *Channel) CommitterPollingTimeout() time.Duration

func (*Channel) CommitterWaitForEventTimeout added in v0.4.0

func (c *Channel) CommitterWaitForEventTimeout() time.Duration

func (*Channel) DeliveryBufferSize added in v0.4.1

func (c *Channel) DeliveryBufferSize() int

func (*Channel) DeliverySleepAfterFailure added in v0.4.0

func (c *Channel) DeliverySleepAfterFailure() time.Duration

func (*Channel) DiscoveryDefaultTTLS added in v0.4.0

func (c *Channel) DiscoveryDefaultTTLS() time.Duration

func (*Channel) DiscoveryTimeout added in v0.4.0

func (c *Channel) DiscoveryTimeout() time.Duration

func (*Channel) FinalityEventQueueWorkers added in v0.4.0

func (c *Channel) FinalityEventQueueWorkers() int

func (*Channel) FinalityForPartiesWaitTimeout added in v0.4.0

func (c *Channel) FinalityForPartiesWaitTimeout() time.Duration

func (*Channel) FinalityWaitTimeout added in v0.4.0

func (c *Channel) FinalityWaitTimeout() time.Duration

func (*Channel) GetNumRetries added in v0.4.0

func (c *Channel) GetNumRetries() uint

func (*Channel) GetRetrySleep added in v0.4.0

func (c *Channel) GetRetrySleep() time.Duration

func (*Channel) ID added in v0.4.0

func (c *Channel) ID() string

func (*Channel) Verify added in v0.4.0

func (c *Channel) Verify() error

type Committer added in v0.4.0

type Committer struct {
	WaitForEventTimeout time.Duration     `yaml:"WaitForEventTimeout,omitempty"`
	PollingTimeout      time.Duration     `yaml:"PollingTimeout,omitempty"`
	Finality            CommitterFinality `yaml:"Finality,omitempty"`
	Parallelism         int               `yaml:"Parallelism,omitempty"`
}

type CommitterFinality added in v0.4.0

type CommitterFinality struct {
	NumRetries       uint          `yaml:"NumRetries,omitempty"`
	UnknownTxTimeout time.Duration `yaml:"UnknownTxTimeout,omitempty"`
}

type ConnectionConfig

type ConnectionConfig = grpc.ConnectionConfig

type Delivery added in v0.4.0

type Delivery struct {
	BufferSize          int           `yaml:"BufferSize,omitempty"`
	WaitForEventTimeout time.Duration `yaml:"WaitForEventTimeout,omitempty"`
	SleepAfterFailure   time.Duration `yaml:"SleepAfterFailure,omitempty"`
}

type Discovery added in v0.4.0

type Discovery struct {
	Timeout time.Duration `yaml:"Timeout,omitempty"`
}

type Endpoint

type Endpoint struct {
	Resolvers []Resolver `yaml:"resolvers,omitempty"`
}

type File

type File struct {
	File string `yaml:"file"`
}

type Files

type Files struct {
	Files []string `yaml:"files"`
}

type Finality added in v0.4.0

type Finality struct {
	WaitForEventTimeout   time.Duration `yaml:"WaitForEventTimeout,omitempty"`
	ForPartiesWaitTimeout time.Duration `yaml:"ForPartiesWaitTimeout,omitempty"`
	EventQueueWorkers     int           `yaml:"EventQueueWorkers,omitempty"`
}

type KeyIDMapping

type KeyIDMapping struct {
	SKI string `yaml:"SKI,omitempty"`
	ID  string `yaml:"ID,omitempty"`
}

type MSP

type MSP struct {
	ID        string                      `yaml:"id"`
	MSPType   string                      `yaml:"mspType"`
	MSPID     string                      `yaml:"mspID"`
	Path      string                      `yaml:"path"`
	CacheSize int                         `yaml:"cacheSize"`
	Opts      map[interface{}]interface{} `yaml:"opts, omitempty"`
}

type MSPOpts

type MSPOpts struct {
	BCCSP *BCCSP `yaml:"BCCSP,omitempty"`
}

type Network

type Network struct {
	Default    bool                `yaml:"default,omitempty"`
	DefaultMSP string              `yaml:"defaultMSP"`
	MSPs       []*MSP              `yaml:"msps"`
	TLS        TLS                 `yaml:"tls"`
	Orderers   []*ConnectionConfig `yaml:"orderers"`
	Peers      []*ConnectionConfig `yaml:"peers"`
	Channels   []*Channel          `yaml:"channels"`
	Vault      Vault               `yaml:"vault"`
	Endpoint   *Endpoint           `yaml:"endpoint,omitempty"`
}

type PKCS11

type PKCS11 struct {
	// Default algorithms when not specified (Deprecated?)
	Security int    `yaml:"Security"`
	Hash     string `yaml:"Hash"`

	// PKCS11 options
	Library        string         `yaml:"Library"`
	Label          string         `yaml:"Label"`
	Pin            string         `yaml:"Pin"`
	SoftwareVerify bool           `yaml:"SoftwareVerify,omitempty"`
	Immutable      bool           `yaml:"Immutable,omitempty"`
	AltID          string         `yaml:"AltId,omitempty"`
	KeyIDs         []KeyIDMapping `yaml:"KeyIds,omitempty" mapstructure:"KeyIds"`
}

type Resolver

type Resolver struct {
	// Name of the resolver
	Name string `yaml:"name,omitempty"`
	// Domain is option
	Domain string `yaml:"domain,omitempty"`
	// Identity specifies an MSP Identity
	Identity MSP `yaml:"identity,omitempty"`
	// Addresses where to reach this identity
	Addresses map[string]string `yaml:"addresses,omitempty"`
	// Aliases is a list of alias for this resolver
	Aliases []string `yaml:"aliases,omitempty"`
}

Resolver models a Fabric identity resolver

type Service added in v0.4.0

type Service struct {
	driver.Configuration
	// contains filtered or unexported fields
}

func NewService added in v0.4.0

func NewService(configService driver.Configuration, name string, defaultConfig bool) (*Service, error)

func (*Service) BroadcastNumRetries added in v0.4.0

func (s *Service) BroadcastNumRetries() int

func (*Service) BroadcastRetryInterval added in v0.4.0

func (s *Service) BroadcastRetryInterval() time.Duration

func (*Service) Channel added in v0.4.0

func (s *Service) Channel(name string) driver.ChannelConfig

func (*Service) ChannelIDs added in v0.4.0

func (s *Service) ChannelIDs() []string

func (*Service) ClientConnTimeout added in v0.4.0

func (s *Service) ClientConnTimeout() time.Duration

func (*Service) DefaultChannel added in v0.4.0

func (s *Service) DefaultChannel() string

func (*Service) DefaultMSP added in v0.4.0

func (s *Service) DefaultMSP() string

DefaultMSP returns the default MSP

func (*Service) DriverName added in v0.4.0

func (s *Service) DriverName() string

func (*Service) GetBool added in v0.4.0

func (s *Service) GetBool(key string) bool

func (*Service) GetDuration added in v0.4.0

func (s *Service) GetDuration(key string) time.Duration

func (*Service) GetPath added in v0.4.0

func (s *Service) GetPath(key string) string

func (*Service) GetString added in v0.4.0

func (s *Service) GetString(key string) string

func (*Service) IsChannelQuiet added in v0.4.0

func (s *Service) IsChannelQuiet(name string) bool

func (*Service) IsSet added in v0.4.0

func (s *Service) IsSet(key string) bool

func (*Service) KeepAliveClientInterval added in v0.4.0

func (s *Service) KeepAliveClientInterval() time.Duration

func (*Service) KeepAliveClientTimeout added in v0.4.0

func (s *Service) KeepAliveClientTimeout() time.Duration

func (*Service) MSPCacheSize added in v0.4.0

func (s *Service) MSPCacheSize() int

func (*Service) MSPs added in v0.4.0

func (s *Service) MSPs() ([]MSP, error)

func (*Service) NetworkName added in v0.4.0

func (s *Service) NetworkName() string

func (*Service) NewDefaultChannelConfig added in v0.4.0

func (s *Service) NewDefaultChannelConfig(name string) driver.ChannelConfig

func (*Service) OrdererConnectionPoolSize added in v0.4.0

func (s *Service) OrdererConnectionPoolSize() int

func (*Service) Orderers added in v0.4.0

func (s *Service) Orderers() []*ConnectionConfig

func (*Service) OrderingTLSClientAuthRequired added in v0.4.0

func (s *Service) OrderingTLSClientAuthRequired() (bool, bool)

func (*Service) OrderingTLSEnabled added in v0.4.0

func (s *Service) OrderingTLSEnabled() (bool, bool)

func (*Service) PickOrderer added in v0.4.0

func (s *Service) PickOrderer() *ConnectionConfig

func (*Service) PickPeer added in v0.4.0

func (*Service) Resolvers added in v0.4.0

func (s *Service) Resolvers() ([]Resolver, error)

func (*Service) SetConfigOrderers added in v0.4.0

func (s *Service) SetConfigOrderers(orderers []*ConnectionConfig) error

func (*Service) TLSClientAuthRequired added in v0.4.0

func (s *Service) TLSClientAuthRequired() bool

func (*Service) TLSClientCertFile added in v0.4.0

func (s *Service) TLSClientCertFile() string

func (*Service) TLSClientKeyFile added in v0.4.0

func (s *Service) TLSClientKeyFile() string

func (*Service) TLSEnabled added in v0.4.0

func (s *Service) TLSEnabled() bool

func (*Service) TLSServerHostOverride added in v0.4.0

func (s *Service) TLSServerHostOverride() string

func (*Service) TranslatePath added in v0.4.0

func (s *Service) TranslatePath(path string) string

TranslatePath translates the passed path relative to the path from which the configuration has been loaded

func (*Service) UnmarshalKey added in v0.4.0

func (s *Service) UnmarshalKey(key string, rawVal interface{}) error

func (*Service) VaultPersistenceName added in v0.4.1

func (s *Service) VaultPersistenceName() driver2.PersistenceName

func (*Service) VaultTXStoreCacheSize added in v0.4.0

func (s *Service) VaultTXStoreCacheSize() int

type SoftwareProvider

type SoftwareProvider struct {
	Hash     string `yaml:"Hash,omitempty"`
	Security int    `yaml:"Security,omitempty"`
}

type TLS

type TLS struct {
	Enabled            bool
	ClientAuthRequired bool
	Cert               File   `yaml:"cert"`
	Key                File   `yaml:"key"`
	ClientCert         File   `yaml:"clientCert"`
	ClientKey          File   `yaml:"clientKey"`
	RootCert           File   `yaml:"rootCert"`
	ClientRootCAs      Files  `yaml:"clientRootCAs"`
	RootCertFile       string `yaml:"rootCertFile"`
}

type Vault

type Vault struct {
	Persistence VaultPersistence `yaml:"persistence"`
}

type VaultOpts

type VaultOpts struct {
	Path string `yaml:"path"`
}

type VaultPersistence

type VaultPersistence struct {
	Type string    `yaml:"type"`
	Opts VaultOpts `yaml:"opts"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL