config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GlobalMSPID is used as the consortium-wide MSP ID (i.e. non org-specific)
	GlobalMSPID = "general"

	// ProtocolComponentName is the name of the Sidetree protocol config component
	ProtocolComponentName = "protocol"

	// SidetreeAppName is the '=name of the Sidetree config application
	SidetreeAppName = "sidetree"

	// SidetreeAppVersion is the version of the Sidetree config application
	SidetreeAppVersion = "1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

type Monitor struct {
	Period time.Duration
}

Monitor holds Sidetree monitor config

type Namespace

type Namespace struct {
	Namespace string
	BasePath  string
}

Namespace holds Sidetree namespace config

type Peer

type Peer struct {
	// contains filtered or unexported fields
}

Peer holds the Sidetree peer config

func NewPeer

func NewPeer() *Peer

NewPeer returns a new peer config

func (*Peer) SidetreeListenURL

func (c *Peer) SidetreeListenURL() (string, error)

SidetreeListenURL returns the URL on which the Sidetree REST service should be started

type Sidetree

type Sidetree struct {
	BatchWriterTimeout time.Duration
}

Sidetree holds general Sidetree configuration

type SidetreePeer

type SidetreePeer struct {
	Monitor    Monitor
	Namespaces []Namespace
}

SidetreePeer holds peer-specific Sidetree config

type SidetreeProvider

type SidetreeProvider struct {
	// contains filtered or unexported fields
}

SidetreeProvider manages Sidetree configuration for the various channels

func NewSidetreeProvider

func NewSidetreeProvider(configProvider configServiceProvider) *SidetreeProvider

NewSidetreeProvider returns a new SidetreeProvider instance

func (*SidetreeProvider) ForChannel

func (p *SidetreeProvider) ForChannel(channelID string) SidetreeService

ForChannel returns the service for the given channel

type SidetreeService

type SidetreeService interface {
	LoadProtocols(namespace string) (map[string]protocolApi.Protocol, error)
	LoadSidetree(namespace string) (Sidetree, error)
	LoadSidetreePeer(mspID, peerID string) (SidetreePeer, error)
}

SidetreeService is a service that loads Sidetree configuration

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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