helpers

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: Apache-2.0 Imports: 17 Imported by: 20

Documentation

Index

Constants

View Source
const (

	// DefaultNamespace is the default namespace for all operations
	DefaultNamespace = "default"

	DefaultStorageclass = ""

	DefaultCAImage   = "hyperledger/fabric-ca"
	DefaultCAVersion = "1.4.9"

	DefaultPeerImage   = "quay.io/kfsoftware/fabric-peer"
	DefaultPeerVersion = "amd64-2.2.0"

	DefaultOrdererImage   = "hyperledger/fabric-orderer"
	DefaultOrdererVersion = "amd64-2.2.0"
)
View Source
const (
	PeerType    = "PEER"
	OrdererType = "ORDERER"
)

Variables

This section is empty.

Functions

func ExecKubectl

func ExecKubectl(ctx context.Context, args ...string) ([]byte, error)

ExecKubectl executes the given command using `kubectl`

func GetClusterOrderers

func GetClusterOrderers(
	oclient *operatorv1.Clientset,
	ns string,
) ([]*Organization, []*ClusterOrderingService, error)

func GetClusterPeers

func GetClusterPeers(oclient *operatorv1.Clientset, ns string) ([]*Organization, []*ClusterPeer, error)

func GetCollectionConfigFromBytes

func GetCollectionConfigFromBytes(cconfBytes []byte) ([]*pb.CollectionConfig, error)

func GetKubeClient

func GetKubeClient() (*kubernetes.Clientset, error)

GetKubeClient provides k8s client for kubeconfig

func GetKubeExtensionClient

func GetKubeExtensionClient() (*apiextension.Clientset, error)

GetKubeExtensionClient provides k8s client for CRDs

func GetKubeOperatorClient

func GetKubeOperatorClient() (*operatorv1.Clientset, error)

GetKubeOperatorClient provides k8s client for operator

func ToYaml

func ToYaml(objs []runtime.Object) ([]string, error)

ToYaml takes a slice of values, and returns corresponding YAML representation as a string slice

Types

type ClusterCA

type ClusterCA struct {
	Object hlfv1alpha1.FabricCA
	Spec   hlfv1alpha1.FabricCASpec
	Status hlfv1alpha1.FabricCAStatus
	Name   string
}

func GetCertAuthByFullName

func GetCertAuthByFullName(oclient *operatorv1.Clientset, name string) (*ClusterCA, error)

func GetCertAuthByName

func GetCertAuthByName(oclient *operatorv1.Clientset, name string, ns string) (*ClusterCA, error)

func GetCertAuthByURL

func GetCertAuthByURL(oclient *operatorv1.Clientset, host string, port int) (*ClusterCA, error)

func GetClusterCAs

func GetClusterCAs(oclient *operatorv1.Clientset, ns string) ([]*ClusterCA, error)

type ClusterOrdererNode

type ClusterOrdererNode struct {
	Name   string
	Spec   hlfv1alpha1.FabricOrdererNodeSpec
	Status hlfv1alpha1.FabricOrdererNodeStatus
}

type ClusterPeer

type ClusterPeer struct {
	Name      string
	Spec      hlfv1alpha1.FabricPeerSpec
	Status    hlfv1alpha1.FabricPeerStatus
	TLSCACert string
	RootCert  string
	Identity  Identity
}

func GetPeerByFullName

func GetPeerByFullName(oclient *operatorv1.Clientset, name string) (*ClusterPeer, error)

type Identity

type Identity struct {
	Key  string
	Cert string
}

type Organization

type Organization struct {
	Type             OrganizationType
	MspID            string
	OrderingServices []*ClusterOrderingService
	Peers            []*ClusterPeer
}

type OrganizationType

type OrganizationType = string

Jump to

Keyboard shortcuts

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