context

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: 4 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.ViewClient
	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) 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) 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) SetPortsByPeerID

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

func (*Context) SetViewClient

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

func (*Context) SetViewIdentity

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

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