api

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: 6 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)
	HostByPeerID(prefix string, id string) string
	SetHostByPeerID(prefix string, id string, host string)

	PortsByOrdererID(prefix string, id string) Ports
	SetPortsByOrdererID(prefix string, id string, ports Ports)
	HostByOrdererID(prefix string, id string) string
	SetHostByOrdererID(prefix string, id string, host string)

	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 GRPCClient)
	SetWebClient(name string, c WebClient)
	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 GRPCClient added in v0.3.0

type GRPCClient interface {
	ViewClient
	StreamCallView(fid string, input []byte) (*view.Stream, error)
}

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
}

type WebClient added in v0.3.0

type WebClient interface {
	ViewClient
	StreamCallView(fid string, input []byte) (*web.WSStream, error)
}

Jump to

Keyboard shortcuts

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