fsc

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 35 Imported by: 18

Documentation

Index

Constants

View Source
const (
	ListenPort api.PortName = "Listen" // Port at which the fsc node might listen for some service
	ViewPort   api.PortName = "View"   // Port at which the View Service Server respond
	P2PPort    api.PortName = "P2P"    // Port at which the P2P Communication Layer respond
	WebPort    api.PortName = "Web"    // Port at which the Web Server respond
)
View Source
const (
	TopologyName = "fsc"
)

Variables

This section is empty.

Functions

func GetKVSOrionCreator

func GetKVSOrionCreator(peer *node2.Peer) string

func GetKVSOrionDatabase

func GetKVSOrionDatabase(peer *node2.Peer) string

func GetKVSOrionNetwork

func GetKVSOrionNetwork(peer *node2.Peer) string

func GetPersistenceType

func GetPersistenceType(peer *node2.Peer) string

func PeerPortNames

func PeerPortNames() []api.PortName

PeerPortNames returns the list of ports that need to be reserved for a Peer.

func WithAlias

func WithAlias(alias string) node2.Option

func WithOrionPersistence

func WithOrionPersistence(network, db, creator string) node.Option

WithOrionPersistence set FSC backend to an orion backend

Types

type Builder

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

func (*Builder) Build

func (c *Builder) Build(path string) string

func (*Builder) FSCCLI

func (c *Builder) FSCCLI() string

type BuilderClient

type BuilderClient interface {
	Build(path string) string
}

type Logging

type Logging struct {
	Spec   string `yaml:"spec,omitempty"`
	Format string `yaml:"format,omitempty"`
}

type Monitoring added in v0.3.0

type Monitoring struct {
	TracingType     string `yaml:"tracingType,omitempty"`
	TracingEndpoint string `yaml:"tracingEndpoint,omitempty"`
	MetricsType     string `yaml:"metricsType,omitempty"`
	TLS             bool   `yaml:"tls,omitempty"`
}

type Platform

type Platform struct {
	Context           api.Context
	NetworkID         string
	Builder           *Builder
	Topology          *Topology
	EventuallyTimeout time.Duration

	Organizations []*node2.Organization
	Peers         []*node2.Peer
	Resolvers     []*Resolver
	// contains filtered or unexported fields
}

func NewPlatform

func NewPlatform(Registry api.Context, t api.Topology, builderClient BuilderClient) *Platform

func (*Platform) AdminLocalMSPIdentityCert

func (p *Platform) AdminLocalMSPIdentityCert(peer *node2.Peer) string

func (*Platform) AdminLocalMSPPrivateKey

func (p *Platform) AdminLocalMSPPrivateKey(peer *node2.Peer) string

func (*Platform) BootstrapNode

func (p *Platform) BootstrapNode(me *node2.Peer) string

func (*Platform) BootstrapViewNodeGroupRunner

func (p *Platform) BootstrapViewNodeGroupRunner() ifrit.Runner

func (*Platform) CACertsBundlePath

func (p *Platform) CACertsBundlePath() string

func (*Platform) CheckTopology

func (p *Platform) CheckTopology()

func (*Platform) Cleanup

func (p *Platform) Cleanup()

func (*Platform) ClientAuthRequired

func (p *Platform) ClientAuthRequired() bool

func (*Platform) ConcatenateTLSCACertificates

func (p *Platform) ConcatenateTLSCACertificates()

func (*Platform) CryptoConfigPath

func (p *Platform) CryptoConfigPath() string

func (*Platform) CryptoPath

func (p *Platform) CryptoPath() string

func (*Platform) Cryptogen

func (p *Platform) Cryptogen(command common.Command) (*gexec.Session, error)

func (*Platform) FSCCLI

func (p *Platform) FSCCLI(command common.Command) (*gexec.Session, error)

func (*Platform) FSCNodeGroupRunner

func (p *Platform) FSCNodeGroupRunner() ifrit.Runner

func (*Platform) FSCNodeRunner

func (p *Platform) FSCNodeRunner(node *node2.Peer, env ...string) *runner2.Runner

func (*Platform) GenerateArtifacts

func (p *Platform) GenerateArtifacts()

func (*Platform) GenerateCmd

func (p *Platform) GenerateCmd(output io.Writer, node *node2.Peer) string

func (*Platform) GenerateConfigTree

func (p *Platform) GenerateConfigTree()

func (*Platform) GenerateCoreConfig

func (p *Platform) GenerateCoreConfig(peer *node2.Peer)

func (*Platform) GenerateCryptoConfig

func (p *Platform) GenerateCryptoConfig()

func (*Platform) GenerateResolverMap

func (p *Platform) GenerateResolverMap()

func (*Platform) GetAdminSigningIdentity

func (p *Platform) GetAdminSigningIdentity(peer *node2.Peer) (view.SigningIdentity, error)

func (*Platform) GetSigningIdentity

func (p *Platform) GetSigningIdentity(peer *node2.Peer) (view.SigningIdentity, error)

func (*Platform) InitClients

func (p *Platform) InitClients()

func (*Platform) Load

func (p *Platform) Load()

func (*Platform) LocalMSPIdentityCert

func (p *Platform) LocalMSPIdentityCert(peer *node2.Peer) string

func (*Platform) LocalMSPPrivateKey

func (p *Platform) LocalMSPPrivateKey(peer *node2.Peer) string

func (*Platform) Members

func (p *Platform) Members() []grouper.Member

func (*Platform) Name

func (p *Platform) Name() string

func (*Platform) NodeClientConfigPath

func (p *Platform) NodeClientConfigPath(peer *node2.Peer) string

func (*Platform) NodeCmdDir

func (p *Platform) NodeCmdDir(peer *node2.Peer) string

func (*Platform) NodeCmdPackage

func (p *Platform) NodeCmdPackage(peer *node2.Peer) string

func (*Platform) NodeCmdPath

func (p *Platform) NodeCmdPath(peer *node2.Peer) string

func (*Platform) NodeConfigPath

func (p *Platform) NodeConfigPath(peer *node2.Peer) string

func (*Platform) NodeDir

func (p *Platform) NodeDir(peer *node2.Peer) string

func (*Platform) NodeKVSDir

func (p *Platform) NodeKVSDir(peer *node2.Peer) string

func (*Platform) NodeLocalCertPath

func (p *Platform) NodeLocalCertPath(node *node2.Peer) string

func (*Platform) NodeLocalPrivateKeyPath

func (p *Platform) NodeLocalPrivateKeyPath(node *node2.Peer) string

func (*Platform) NodeLocalTLSDir

func (p *Platform) NodeLocalTLSDir(peer *node2.Peer) string

func (*Platform) NodePort

func (p *Platform) NodePort(node *node2.Peer, portName api.PortName) uint16

func (*Platform) OperationAddress

func (p *Platform) OperationAddress(peer *node2.Peer) string

func (*Platform) Organization

func (p *Platform) Organization(orgName string) *node2.Organization

func (*Platform) Peer

func (p *Platform) Peer(orgName, peerName string) *node2.Peer

func (*Platform) PeerAddress

func (p *Platform) PeerAddress(peer *node2.Peer, portName api.PortName) string

func (*Platform) PeerOrgs

func (p *Platform) PeerOrgs() []*node2.Organization

func (*Platform) PeerPort

func (p *Platform) PeerPort(peer *node2.Peer, portName api.PortName) uint16

func (*Platform) PeersInOrg

func (p *Platform) PeersInOrg(orgName string) []*node2.Peer

func (*Platform) PostRun

func (p *Platform) PostRun(bool)

func (*Platform) StartSession

func (p *Platform) StartSession(cmd *exec.Cmd, name string) (*gexec.Session, error)

func (*Platform) Type

func (p *Platform) Type() string

type Resolver

type Resolver struct {
	Name      string
	Domain    string
	Identity  ResolverIdentity
	Addresses map[api.PortName]string
	Aliases   []string
	Port      int
}

type ResolverIdentity

type ResolverIdentity struct {
	ID   string
	Path string
}

type Templates added in v0.3.0

type Templates struct {
	Node   string `yaml:"node,omitempty"`
	Core   string `yaml:"core,omitempty"`
	Crypto string `yaml:"crypto,omitempty"`
}

Templates can be used to provide custom templates to GenerateConfigTree.

func (*Templates) CoreTemplate added in v0.3.0

func (t *Templates) CoreTemplate() string

func (*Templates) CryptoTemplate added in v0.3.0

func (t *Templates) CryptoTemplate() string

func (*Templates) NodeTemplate added in v0.3.0

func (t *Templates) NodeTemplate() string

type Topology

type Topology struct {
	TopologyName string       `yaml:"name,omitempty"`
	TopologyType string       `yaml:"type,omitempty"`
	Nodes        []*node.Node `yaml:"peers,omitempty"`
	GRPCLogging  bool         `yaml:"grpcLogging,omitempty"`
	Logging      *Logging     `yaml:"logging,omitempty"`
	LogToFile    bool         `yaml:"logToFile,omitempty"`
	Templates    Templates    `yaml:"templates,omitempty"`
	Monitoring   Monitoring   `yaml:"monitoring,omitempty"`
}

func NewTopology

func NewTopology() *Topology

NewTopology returns an empty FSC network topology.

func (*Topology) AddNodeByName

func (t *Topology) AddNodeByName(name string) *node.Node

AddNodeByName adds an empty new node with the passed name

func (*Topology) AddNodeFromTemplate

func (t *Topology) AddNodeFromTemplate(name string, template *node.Node) *node.Node

AddNodeFromTemplate adds a new node with the passed name and template

func (*Topology) AddSDK added in v0.2.0

func (t *Topology) AddSDK(sdk api.SDK)

func (*Topology) DisablePrometheusTLS added in v0.3.0

func (t *Topology) DisablePrometheusTLS()

func (*Topology) EnableLogToFile

func (t *Topology) EnableLogToFile()

func (*Topology) EnableOPTLTracing added in v0.3.0

func (t *Topology) EnableOPTLTracing()

func (*Topology) EnablePrometheusMetrics

func (t *Topology) EnablePrometheusMetrics()

func (*Topology) ListNodes

func (t *Topology) ListNodes(ids ...string) []*node.Node

func (*Topology) Name

func (t *Topology) Name() string

func (*Topology) NewTemplate

func (t *Topology) NewTemplate(name string) *node.Node

func (*Topology) SetBootstrapNode

func (t *Topology) SetBootstrapNode(n *node.Node)

func (*Topology) SetLogging

func (t *Topology) SetLogging(spec, format string)

func (*Topology) Type

func (t *Topology) Type() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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