context

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: 5 Imported by: 1

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 struct {
	Builder     Builder
	PortCounter uint16

	TopologiesByName map[string]api.Topology
	PlatformsByName  map[string]api.Platform

	ViewClients             map[string]api.GRPCClient
	WebClients              map[string]api.WebClient
	ViewCLIs                map[string]api.ViewClient
	ViewIdentities          map[string]view.Identity
	ViewIdentityAliases     map[string][]string
	ConnectionConfigs       map[string]*grpc.ConnectionConfig
	ClientSigningIdentities map[string]SigningIdentity
	AdminSigningIdentities  map[string]SigningIdentity

	SigHUPIgnore bool
	// contains filtered or unexported fields
}

func New

func New(rootDir string, portCounter uint16, builder api.Builder, topologies ...api.Topology) *Context

func (*Context) AddExtension

func (c *Context) AddExtension(id string, name api.ExtensionName, extension string)

func (*Context) AddIdentityAlias

func (c *Context) AddIdentityAlias(id string, alias string)

func (*Context) AddPlatform

func (c *Context) AddPlatform(platform api.Platform)

func (*Context) AdminSigningIdentity

func (c *Context) AdminSigningIdentity(name string) view2.SigningIdentity

func (*Context) ClientSigningIdentity

func (c *Context) ClientSigningIdentity(name string) view2.SigningIdentity

func (*Context) ConnectionConfig

func (c *Context) ConnectionConfig(name string) *grpc.ConnectionConfig

func (*Context) ExtensionsByPeerID

func (c *Context) ExtensionsByPeerID(name string) api.Extensions

func (*Context) GetViewIdentityAliases

func (c *Context) GetViewIdentityAliases(name string) []string

func (*Context) HostByOrdererID added in v0.3.0

func (c *Context) HostByOrdererID(prefix string, id string) string

func (*Context) HostByPeerID added in v0.3.0

func (c *Context) HostByPeerID(prefix string, id string) string

func (*Context) IgnoreSigHUP

func (c *Context) IgnoreSigHUP() bool

func (*Context) PlatformByName

func (c *Context) PlatformByName(name string) api.Platform

func (*Context) PlatformsByType

func (c *Context) PlatformsByType(typ string) []api.Platform

func (*Context) PortsByOrdererID added in v0.3.0

func (c *Context) PortsByOrdererID(prefix string, id string) api.Ports

func (*Context) PortsByPeerID

func (c *Context) PortsByPeerID(prefix string, id string) api.Ports

func (*Context) ReservePort

func (c *Context) ReservePort() uint16

func (*Context) RootDir

func (c *Context) RootDir() string

func (*Context) SetAdminSigningIdentity

func (c *Context) SetAdminSigningIdentity(name string, id view2.SigningIdentity)

func (*Context) SetCLI

func (c *Context) SetCLI(name string, client api.ViewClient)

func (*Context) SetClientSigningIdentity

func (c *Context) SetClientSigningIdentity(name string, id view2.SigningIdentity)

func (*Context) SetConnectionConfig

func (c *Context) SetConnectionConfig(name string, cc *grpc.ConnectionConfig)

func (*Context) SetHostByOrdererID added in v0.3.0

func (c *Context) SetHostByOrdererID(prefix string, id string, host string)

func (*Context) SetHostByPeerID added in v0.3.0

func (c *Context) SetHostByPeerID(prefix string, id string, host string)

func (*Context) SetPortsByOrdererID added in v0.3.0

func (c *Context) SetPortsByOrdererID(prefix string, id string, ports api.Ports)

func (*Context) SetPortsByPeerID

func (c *Context) SetPortsByPeerID(prefix string, id string, ports api.Ports)

func (*Context) SetViewClient

func (c *Context) SetViewClient(name string, client api.GRPCClient)

func (*Context) SetViewIdentity

func (c *Context) SetViewIdentity(name string, cert []byte)

func (*Context) SetWebClient added in v0.3.0

func (c *Context) SetWebClient(name string, client api.WebClient)

func (*Context) TopologyByName

func (c *Context) TopologyByName(name string) api.Topology

type SigningIdentity

type SigningIdentity interface {
	Serialize() ([]byte, error)

	Sign(msg []byte) ([]byte, error)
}

Jump to

Keyboard shortcuts

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