discovery

package
v0.0.0-...-95b87ed Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PeersCommand     = "peers"
	ConfigCommand    = "config"
	EndorsersCommand = "endorsers"
)

Variables

This section is empty.

Functions

func AddCommands

func AddCommands(cli CommandRegistrar)

Types

type ChannelResponse

type ChannelResponse interface {
	discoveryclient.ChannelResponse
}

type ClientStub

type ClientStub struct {
}

func (*ClientStub) Send

func (stub *ClientStub) Send(server string, conf common.Config, req *discoveryclient.Request) (ServiceResponse, error)

type CommandRegistrar

type CommandRegistrar interface {
	Command(name, help string, onCommand common.CLICommand) *kingpin.CmdClause
}

type ConfigCmd

type ConfigCmd struct {
	// contains filtered or unexported fields
}

func NewConfigCmd

func NewConfigCmd(stub Stub, parser ResponseParser) *ConfigCmd

func (*ConfigCmd) Execute

func (pc *ConfigCmd) Execute(conf common.Config) error

func (*ConfigCmd) SetChannel

func (pc *ConfigCmd) SetChannel(channel *string)

func (*ConfigCmd) SetServer

func (pc *ConfigCmd) SetServer(server *string)

type ConfigResponseParser

type ConfigResponseParser struct {
	io.Writer
}

func (*ConfigResponseParser) ParseResponse

func (parser *ConfigResponseParser) ParseResponse(channel string, res ServiceResponse) error

type EndorserResponseParser

type EndorserResponseParser struct {
	io.Writer
}

func (*EndorserResponseParser) ParseResponse

func (parser *EndorserResponseParser) ParseResponse(channel string, res ServiceResponse) error

type EndorsersCmd

type EndorsersCmd struct {
	// contains filtered or unexported fields
}

func NewEndorsersCmd

func NewEndorsersCmd(stub Stub, parser ResponseParser) *EndorsersCmd

func (*EndorsersCmd) Execute

func (pc *EndorsersCmd) Execute(conf common.Config) error

func (*EndorsersCmd) SetChaincodes

func (pc *EndorsersCmd) SetChaincodes(chaincodes *[]string)

func (*EndorsersCmd) SetChannel

func (pc *EndorsersCmd) SetChannel(channel *string)

func (*EndorsersCmd) SetCollections

func (pc *EndorsersCmd) SetCollections(collections *map[string]string)

func (*EndorsersCmd) SetServer

func (pc *EndorsersCmd) SetServer(server *string)

type LocalResponse

type LocalResponse interface {
	discoveryclient.LocalResponse
}

type PeerCmd

type PeerCmd struct {
	// contains filtered or unexported fields
}

func NewPeerCmd

func NewPeerCmd(stub Stub, parser ResponseParser) *PeerCmd

func (*PeerCmd) Execute

func (pc *PeerCmd) Execute(conf common.Config) error

func (*PeerCmd) SetChannel

func (pc *PeerCmd) SetChannel(channel *string)

func (*PeerCmd) SetServer

func (pc *PeerCmd) SetServer(server *string)

type PeerResponseParser

type PeerResponseParser struct {
	io.Writer
}

func (*PeerResponseParser) ParseResponse

func (parser *PeerResponseParser) ParseResponse(channel string, res ServiceResponse) error

type RawStub

type RawStub struct {
}

func (*RawStub) Send

func (stub *RawStub) Send(server string, conf common.Config, req *discoveryclient.Request) (ServiceResponse, error)

type ResponseParser

type ResponseParser interface {
	ParseResponse(channel string, response ServiceResponse) error
}

type ServiceResponse

type ServiceResponse interface {
	ForChannel(string) discoveryclient.ChannelResponse

	ForLocal() discoveryclient.LocalResponse

	Raw() *discovery.Response
}

type Stub

type Stub interface {
	Send(server string, conf common.Config, req *discovery.Request) (ServiceResponse, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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