Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoadBalancePolicy

type LoadBalancePolicy interface {
	Choose(peers []fab.Peer) (fab.Peer, error)
}

    LoadBalancePolicy chooses a peer from a set of peers

    type Random

    type Random struct {
    }

      Random implements a random load-balance policy

      func NewRandom

      func NewRandom() *Random

        NewRandom returns a new Random load-balance policy

        func (*Random) Choose

        func (lbp *Random) Choose(peers []fab.Peer) (fab.Peer, error)

          Choose randomly chooses a peer from the list of peers

          type RoundRobin

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

            RoundRobin implements a round-robin load-balance policy

            func NewRoundRobin

            func NewRoundRobin() *RoundRobin

              NewRoundRobin returns a new RoundRobin load-balance policy

              func (*RoundRobin) Choose

              func (lbp *RoundRobin) Choose(peers []fab.Peer) (fab.Peer, error)

                Choose chooses from the list of peers in round-robin fashion