Documentation
¶
Index ¶
- Constants
- func ReplicaUniqueName(nodeName string, r int) string
- type Alias
- type CA
- type Factory
- type FactoryEntry
- type Node
- func (n *Node) AddOptions(opts ...Option) *Node
- func (n *Node) AddSDK(sdk node.SDK) *Node
- func (n *Node) AddSDKWithBase(base node.SDK, sdks ...node.SDK) *Node
- func (n *Node) Alias(i string) string
- func (n *Node) ID() string
- func (n *Node) PlatformOpts() *Options
- func (n *Node) RegisterResponder(responder view.View, initiator view.View) *Node
- func (n *Node) RegisterViewFactory(id string, factory Factory) *Node
- func (n *Node) ReplicaUniqueNames() []string
- func (n *Node) SetBootstrap() *Node
- func (n *Node) SetExecutable(ExecutablePath string) *Node
- type Option
- type Options
- func (o *Options) AddAlias(alias string)
- func (o *Options) Aliases() []string
- func (o *Options) Get(k string) interface{}
- func (o *Options) GetAllPersistenceKeys() []PersistenceKey
- func (o *Options) GetPersistenceName(k PersistenceKey) (driver2.PersistenceName, bool)
- func (o *Options) GetPostgresPersistence(k driver2.PersistenceName) *SQLOpts
- func (o *Options) GetPostgresPersistences() map[driver2.PersistenceName]*SQLOpts
- func (o *Options) Parse(opts ...Option) error
- func (o *Options) Put(k string, v interface{})
- func (o *Options) PutPersistenceKey(k PersistenceKey)
- func (o *Options) PutPostgresPersistence(k driver2.PersistenceName, p SQLOpts)
- func (o *Options) PutPostgresPersistenceName(k PersistenceKey, p driver2.PersistenceName)
- func (o *Options) ReplicationFactor() int
- type Organization
- type Peer
- type PeerIdentity
- type PersistenceKey
- type PersistenceOpts
- type Replica
- type ResponderEntry
- type SDKElement
- type SDKEntry
- type SQLOpts
- type Synthesizer
Constants ¶
View Source
const CoreTemplate = `` /* 6153-byte string literal not displayed */
View Source
const DefaultCryptoTemplate = `` /* 686-byte string literal not displayed */
View Source
const DefaultTemplate = `` /* 800-byte string literal not displayed */
View Source
const RoutingTemplate = `` /* 128-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func ReplicaUniqueName ¶ added in v0.4.0
Types ¶
type Factory ¶
type Factory interface {
// NewView returns an instance of the View interface build using the passed argument.
NewView(in []byte) (view.View, error)
}
Factory is used to create instances of the View interface
type FactoryEntry ¶
type Node ¶
type Node struct {
Synthesizer `yaml:"Synthesizer,omitempty"`
Name string `yaml:"name,omitempty"`
Bootstrap bool `yaml:"bootstrap,omitempty"`
ExecutablePath string `yaml:"executablePath,omitempty"`
Path string `yaml:"path,omitempty"`
Options *Options `yaml:"options,omitempty"`
}
func NewNodeFromTemplate ¶
func (*Node) AddOptions ¶
func (*Node) AddSDK ¶
AddSDK adds a reference to the passed SDK. AddSDK expects to find a constructor named 'New' followed by the type name of the passed reference.
func (*Node) AddSDKWithBase ¶ added in v0.4.1
func (*Node) PlatformOpts ¶
func (*Node) RegisterResponder ¶
RegisterResponder registers the passed responder to the passed initiator
func (*Node) RegisterViewFactory ¶
func (*Node) ReplicaUniqueNames ¶ added in v0.4.0
func (*Node) SetBootstrap ¶
func (*Node) SetExecutable ¶
SetExecutable sets the executable path of this node
type Options ¶
type Options struct {
Mapping map[string]interface{}
}
func (*Options) GetAllPersistenceKeys ¶ added in v0.4.1
func (o *Options) GetAllPersistenceKeys() []PersistenceKey
func (*Options) GetPersistenceName ¶ added in v0.4.1
func (o *Options) GetPersistenceName(k PersistenceKey) (driver2.PersistenceName, bool)
func (*Options) GetPostgresPersistence ¶ added in v0.4.1
func (o *Options) GetPostgresPersistence(k driver2.PersistenceName) *SQLOpts
func (*Options) GetPostgresPersistences ¶ added in v0.4.1
func (o *Options) GetPostgresPersistences() map[driver2.PersistenceName]*SQLOpts
func (*Options) PutPersistenceKey ¶ added in v0.4.1
func (o *Options) PutPersistenceKey(k PersistenceKey)
func (*Options) PutPostgresPersistence ¶ added in v0.4.1
func (o *Options) PutPostgresPersistence(k driver2.PersistenceName, p SQLOpts)
func (*Options) PutPostgresPersistenceName ¶ added in v0.4.1
func (o *Options) PutPostgresPersistenceName(k PersistenceKey, p driver2.PersistenceName)
func (*Options) ReplicationFactor ¶ added in v0.4.0
type Organization ¶
type Organization struct {
ID string `yaml:"id,omitempty"`
MSPID string `yaml:"msp_id,omitempty"`
MSPType string `yaml:"msp_type,omitempty"`
Name string `yaml:"name,omitempty"`
Domain string `yaml:"domain,omitempty"`
EnableNodeOUs bool `yaml:"enable_node_organizational_units"`
Users int `yaml:"users,omitempty"`
CA *CA `yaml:"ca,omitempty"`
UserNames []string `yaml:"userNames,omitempty"`
}
Organization models information about an Organization. It includes the information needed to populate an MSP with cryptogen.
type Peer ¶
type Peer struct {
*Node
Name string `yaml:"name,omitempty"`
Organization string `yaml:"organization,omitempty"`
Bootstrap bool `yaml:"bootstrap,omitempty"`
ExecutablePath string `yaml:"executablepath,omitempty"`
ExtraIdentities []*PeerIdentity `yaml:"extraidentities,omitempty"`
Admins []string `yaml:"admins,omitempty"`
Aliases []string `yaml:"aliases,omitempty"`
}
Peer defines an FSC node instance
type PeerIdentity ¶
type PersistenceKey ¶ added in v0.4.1
type PersistenceKey string
type PersistenceOpts ¶ added in v0.4.0
type PersistenceOpts struct {
Type driver.PersistenceType
SQL *SQLOpts
}
type Replica ¶ added in v0.4.0
func NewReplica ¶ added in v0.4.0
type ResponderEntry ¶
type SDKElement ¶ added in v0.4.1
type Synthesizer ¶
type Synthesizer struct {
Aliases map[string]Alias `yaml:"Aliases,omitempty"`
Imports []string `yaml:"Imports,omitempty"`
Factories []FactoryEntry `yaml:"Factories,omitempty"`
SDKs []SDKEntry `yaml:"SDKs,omitempty"`
Responders []ResponderEntry `yaml:"Responders,omitempty"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.