microfabd

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Name                   string   `json:"name"`
	EndorsingOrganizations []string `json:"endorsing_organizations"`
	CapabilityLevel        string   `json:"capability_level"`
}

Channel represents a channel in the configuration.

type Config

type Config struct {
	Domain                 string         `json:"domain"`
	Port                   int            `json:"port"`
	Directory              string         `json:"directory"`
	OrderingOrganization   Organization   `json:"ordering_organization"`
	EndorsingOrganizations []Organization `json:"endorsing_organizations"`
	Channels               []Channel      `json:"channels"`
	CapabilityLevel        string         `json:"capability_level"`
	CouchDB                bool           `json:"couchdb"`
	CertificateAuthorities bool           `json:"certificate_authorities"`
	TimeoutString          string         `json:"timeout"`
	TLS                    TLS            `json:"tls"`
	Timeout                time.Duration  `json:"-"`
}

Config represents the configuration.

func DefaultConfig

func DefaultConfig() (*Config, error)

DefaultConfig returns the default configuration.

type Microfab

type Microfab struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Microfab represents an instance of the Microfab application.

func New

func New() (*Microfab, error)

New creates an instance of the Microfab application.

func (*Microfab) Start

func (m *Microfab) Start() error

Start starts the Microfab application.

func (*Microfab) Stop

func (m *Microfab) Stop()

Stop stops the Microfab application.

func (*Microfab) Wait

func (m *Microfab) Wait()

Wait waits for the Microfab application.

type Organization

type Organization struct {
	Name string `json:"name"`
}

Organization represents an organization in the configuration.

type State

type State struct {
	Hash []byte                      `json:"hash"`
	CAS  map[string]*client.Identity `json:"cas"`
	TLS  *client.Identity            `json:"tls"`
}

State represents the state that should be persisted between instances.

type TLS

type TLS struct {
	Enabled     bool    `json:"enabled"`
	Certificate *string `json:"certificate"`
	PrivateKey  *string `json:"private_key"`
	CA          *string `json:"ca"`
}

TLS represents the TLS configuration.

Jump to

Keyboard shortcuts

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