helper

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsPath

func AbsPath(wd string, script string) string

func CreateCA

func CreateCA(crClient *ibpclient.IBPClient, ca *current.IBPCA) error

func CreateOrderer

func CreateOrderer(crClient *ibpclient.IBPClient, orderer *current.IBPOrderer) error

func CreatePeer

func CreatePeer(crClient *ibpclient.IBPClient, peer *current.IBPPeer) error

func GetCommand

func GetCommand(command string, args ...string) *exec.Cmd

func GetJobID

func GetJobID(kclient *kubernetes.Clientset, namespace, name string) (string, error)

Since operator generates a unique ID to postfix the job's name with, this function obtains the job's unique identifier

func OrdererCR

func OrdererCR(namespace, domain, ordererUsername, tlsCert, caHost string) (*current.IBPOrderer, error)

func Org1CACR

func Org1CACR(namespace, domain string) *current.IBPCA

func Org1PeerCR

func Org1PeerCR(namespace, domain, peerUsername, tlsCert, caHost, adminCert string) (*current.IBPPeer, error)

func StartSession

func StartSession(cmd *exec.Cmd, name string) (*gexec.Session, error)

StartSession executes a command session. This should be used to launch command line tools that are expected to run to completion.

Types

type CA

type CA struct {
	Domain     string
	Name       string
	Namespace  string
	WorkingDir string

	CR       *current.IBPCA
	CRClient *ibpclient.IBPClient
	KClient  *kubernetes.Clientset

	integration.NativeResourcePoller
}

func (*CA) Address

func (ca *CA) Address() string

func (*CA) ConnectionProfile

func (ca *CA) ConnectionProfile() (*current.CAConnectionProfile, error)

func (*CA) DeleteIdentity

func (ca *CA) DeleteIdentity(name string) *exec.Cmd

func (*CA) Enroll

func (ca *CA) Enroll(name string, secret string) *exec.Cmd

func (*CA) HealthCheck

func (ca *CA) HealthCheck(url string, cert []byte) bool

func (*CA) JobWithPrefixFound

func (ca *CA) JobWithPrefixFound(prefix, namespace string) bool

func (*CA) PollForCRStatus

func (ca *CA) PollForCRStatus() current.IBPCRStatusType

func (*CA) Register

func (ca *CA) Register(name string, secret string, userType string) *exec.Cmd

func (*CA) TLSPath

func (ca *CA) TLSPath() string

func (*CA) TLSToFile

func (ca *CA) TLSToFile(cert []byte) error

type Orderer

type Orderer struct {
	Domain     string
	Name       string
	Namespace  string
	NodeName   string
	Nodes      []Orderer
	WorkingDir string

	CR       *current.IBPOrderer
	CRClient *ibpclient.IBPClient
	KClient  *kubernetes.Clientset

	integration.NativeResourcePoller
}

func (*Orderer) JobWithPrefixFound

func (o *Orderer) JobWithPrefixFound(prefix, namespace string) bool

func (*Orderer) PollForCRStatus

func (o *Orderer) PollForCRStatus() current.IBPCRStatusType

func (*Orderer) PollForParentCRStatus

func (o *Orderer) PollForParentCRStatus() current.IBPCRStatusType

type Peer

type Peer struct {
	Domain     string
	Name       string
	Namespace  string
	WorkingDir string

	CR       *current.IBPPeer
	CRClient *ibpclient.IBPClient
	KClient  *kubernetes.Clientset

	integration.NativeResourcePoller
}

func (*Peer) ConnectionProfile

func (p *Peer) ConnectionProfile() (*current.CAConnectionProfile, error)

func (*Peer) JobWithPrefixFound

func (p *Peer) JobWithPrefixFound(prefix, namespace string) bool

func (*Peer) PollForCRStatus

func (p *Peer) PollForCRStatus() current.IBPCRStatusType

func (*Peer) TLSPath

func (p *Peer) TLSPath() string

func (*Peer) TLSToFile

func (p *Peer) TLSToFile(cert []byte) error

Jump to

Keyboard shortcuts

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