internal

package
v0.0.0-...-e267800 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadTLSConfig

func LoadTLSConfig(isserver bool, key, cert, root []byte) (*tls.Config, error)

LoadTLSConfig loads the TLS configuration for the chaincode

func NewClientConn

func NewClientConn(
	address string,
	tlsConf *tls.Config,
	kaOpts keepalive.ClientParameters,
) (*grpc.ClientConn, error)

NewClientConn ...

func NewRegisterClient

func NewRegisterClient(conn *grpc.ClientConn) (peerpb.ChaincodeSupport_RegisterClient, error)

NewRegisterClient ...

Types

type Config

type Config struct {
	ChaincodeName string
	TLS           *tls.Config
	KaOpts        keepalive.ClientParameters
}

Config contains chaincode's configuration

func LoadConfig

func LoadConfig() (Config, error)

LoadConfig loads the chaincode configuration

type Server

type Server struct {
	Listener net.Listener
	Server   *grpc.Server
}

Server abstracts grpc service properties

func NewServer

func NewServer(
	address string,
	tlsConf *tls.Config,
	srvKaOpts *keepalive.ServerParameters,
) (*Server, error)

NewServer creates a new implementation of a GRPC Server given a listen address

func (*Server) Start

func (s *Server) Start() error

Start the server

func (*Server) Stop

func (s *Server) Stop()

Stop the server

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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