fabric: github.com/hyperledger/fabric/cmd/common/comm Index | Files

package comm

import "github.com/hyperledger/fabric/cmd/common/comm"


Package Files

client.go config.go

type Client Uses

type Client struct {
    TLSCertHash []byte

Client deals with TLS connections to the discovery server

func NewClient Uses

func NewClient(conf Config) (*Client, error)

NewClient creates a new comm client out of the given configuration

func (*Client) NewDialer Uses

func (c *Client) NewDialer(endpoint string) func() (*grpc.ClientConn, error)

NewDialer creates a new dialer from the given endpoint

type Config Uses

type Config struct {
    CertPath       string
    KeyPath        string
    PeerCACertPath string
    Timeout        time.Duration

Config defines configuration of a Client

func (Config) ToSecureOptions Uses

func (conf Config) ToSecureOptions(newSelfSignedTLSCert genTLSCertFunc) (comm.SecureOptions, error)

ToSecureOptions converts this Config to SecureOptions. The given function generates a self signed client TLS certificate if the TLS certificate and key aren't present at the config

Package comm imports 7 packages (graph) and is imported by 3 packages. Updated 2019-11-20. Refresh now. Tools for package owners.