api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 5 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	Build(path string) string
}

type Context

type Context interface {
	RootDir() string
	ReservePort() uint16

	AddPlatform(platform Platform)
	PlatformByName(name string) Platform
	PlatformsByType(typ string) []Platform

	AddExtension(id string, extension ExtensionName, s string)
	ExtensionsByPeerID(name string) Extensions

	PortsByPeerID(prefix string, id string) Ports
	SetPortsByPeerID(prefix string, id string, ports Ports)

	AddIdentityAlias(name string, alias string)
	TopologyByName(name string) Topology
	SetConnectionConfig(name string, cc *grpc.ConnectionConfig)
	SetClientSigningIdentity(name string, id view.SigningIdentity)
	SetAdminSigningIdentity(name string, id view.SigningIdentity)
	SetViewIdentity(name string, cert []byte)
	ConnectionConfig(name string) *grpc.ConnectionConfig
	ClientSigningIdentity(name string) view.SigningIdentity
	SetViewClient(name string, c ViewClient)
	SetCLI(name string, client ViewClient)
	GetViewIdentityAliases(name string) []string
	AdminSigningIdentity(name string) view.SigningIdentity
	IgnoreSigHUP() bool
}

type ExtensionName

type ExtensionName string
const (
	FabricExtension ExtensionName = "FabricExtension"
	OrionExtension  ExtensionName = "OrionExtension"
)

type Extensions

type Extensions map[ExtensionName][]string

type Platform

type Platform interface {
	Name() string
	Type() string

	GenerateConfigTree()
	GenerateArtifacts()
	Load()

	Members() []grouper.Member
	PostRun(load bool)
	Cleanup()
}

type PlatformFactory

type PlatformFactory interface {
	Name() string
	New(registry Context, t Topology, builder Builder) Platform
}

type PortName

type PortName string

type Ports

type Ports map[PortName]uint16

type Topologies

type Topologies struct {
	Topologies []Topology `yaml:"topologies,omitempty"`
}

func (*Topologies) Export

func (t *Topologies) Export() ([]byte, error)

type Topology

type Topology interface {
	Name() string
	// Type returns the type of network this topology refers to
	Type() string
}

Topology represents a topology of a given network type (fabric, fsc, etc...)

type ViewClient

type ViewClient interface {
	CallView(fid string, in []byte) (interface{}, error)
	IsTxFinal(txid string, opts ...api.ServiceOption) error
}

Jump to

Keyboard shortcuts

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