orion

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: Apache-2.0 Imports: 40 Imported by: 6

Documentation

Index

Constants

View Source
const (
	Port          = network.HostPort
	PeerPortID    = "peer"
	OrdererPortID = "orderer"
)
View Source
const ExtensionTemplate = `` /* 358-byte string literal not displayed */
View Source
const ServerImage = "orionbcdb/orion-server:latest"
View Source
const (
	TopologyName = "orion"
)

Variables

View Source
var RequiredImages = []string{ServerImage}

Functions

func NewPlatformFactory

func NewPlatformFactory() *platformFactory

func Options

func Options(o *node.Options) *opts.Options

func WithRole

func WithRole(role string) node.Option

Types

type DB

type DB struct {
	Name  string   `yaml:"name,omitempty"`
	Roles []string `yaml:"roles,omitempty"`
}

type HelperConfig added in v0.4.0

type HelperConfig struct {
	*InitConfig `yaml:"init"`
}

func ReadHelperConfig added in v0.4.0

func ReadHelperConfig(configPath string) (*HelperConfig, error)

type Identity

type Identity struct {
	Name string
	Cert string
	Key  string
}

type InitConfig added in v0.4.0

type InitConfig struct {
	ServerUrl           string            `yaml:"serverUrl"`
	CACertPath          string            `yaml:"caCertPath"`
	ServerID            string            `yaml:"serverID"`
	AdminID             string            `yaml:"adminID"`
	AdminCertPath       string            `yaml:"adminCertPath"`
	AdminPrivateKeyPath string            `yaml:"adminPrivateKeyPath"`
	CertPaths           map[string]string `yaml:"certPaths"`
	DBs                 []DB              `yaml:"dbs"`
}

func (*InitConfig) CreateDBInstance added in v0.4.0

func (p *InitConfig) CreateDBInstance() (bcdb.BCDB, error)

func (*InitConfig) CreateUserSession added in v0.4.0

func (p *InitConfig) CreateUserSession(bcdb bcdb.BCDB) (bcdb.DBSession, error)

func (*InitConfig) Init added in v0.4.0

func (p *InitConfig) Init() error

type Platform

type Platform struct {
	Context           api2.Context
	Topology          *Topology
	Builder           api2.Builder
	EventuallyTimeout time.Duration

	NetworkID string
	// contains filtered or unexported fields
}

func Network

func Network(ctx *context.Context, id string) *Platform

Network returns the orion network from the passed context bound to the passed id. It returns nil, if nothing is found

func NewPlatform

func NewPlatform(ctx api2.Context, t api2.Topology, builder api2.Builder) *Platform

func (*Platform) Cleanup

func (p *Platform) Cleanup()

func (*Platform) DeleteVault

func (p *Platform) DeleteVault(id string)

func (*Platform) FSCNodeVaultDir

func (p *Platform) FSCNodeVaultDir(uniqueName string) string

func (*Platform) GenerateArtifacts

func (p *Platform) GenerateArtifacts()

func (*Platform) GenerateConfigTree

func (p *Platform) GenerateConfigTree()

func (*Platform) HelperConfigPath added in v0.4.0

func (p *Platform) HelperConfigPath() string

func (*Platform) InitOrionServer

func (p *Platform) InitOrionServer() error

func (*Platform) KeyPath added in v0.4.0

func (p *Platform) KeyPath(role string) string

func (*Platform) Load

func (p *Platform) Load()

func (*Platform) Members

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

func (*Platform) Name

func (p *Platform) Name() string

func (*Platform) PemPath added in v0.4.0

func (p *Platform) PemPath(role string) string

func (*Platform) PostRun

func (p *Platform) PostRun(load bool)

func (*Platform) ServerID added in v0.4.0

func (p *Platform) ServerID() string

func (*Platform) ServerUrl added in v0.4.0

func (p *Platform) ServerUrl() string

func (*Platform) StartOrionServer

func (p *Platform) StartOrionServer()

func (*Platform) Type

func (p *Platform) Type() string

type Topology

type Topology struct {
	TopologyName string `yaml:"name,omitempty"`
	TopologyType string `yaml:"type,omitempty"`
	DBs          []DB
}

func NewTopology

func NewTopology() *Topology

func (*Topology) AddDB

func (t *Topology) AddDB(name string, roles ...string)

func (*Topology) Name

func (t *Topology) Name() string

func (*Topology) SetName

func (t *Topology) SetName(name string)

func (*Topology) SetSDK

func (t *Topology) SetSDK(fscTopology *fsc.Topology, sdk api.SDK)

func (*Topology) SetSDKOnNodes

func (t *Topology) SetSDKOnNodes(sdk api.SDK, nodes ...*node.Node)

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