deliver

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: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractChannelHeaderCertHash

func ExtractChannelHeaderCertHash(msg proto.Message) []byte

Types

type Chain

type Chain interface {
	Sequence() uint64

	PolicyManager() policies.Manager

	Reader() blockledger.Reader

	Errored() <-chan struct{}
}

type ChainManager

type ChainManager interface {
	GetChain(chainID string) Chain
}

type ConfigSequencer

type ConfigSequencer interface {
	Sequence() uint64
}

type ExpiresAtFunc

type ExpiresAtFunc func(identityBytes []byte) time.Time

type Filtered

type Filtered interface {
	IsFiltered() bool
}

type Handler

type Handler struct {
	ExpirationCheckFunc func(identityBytes []byte) time.Time
	ChainManager        ChainManager
	TimeWindow          time.Duration
	BindingInspector    Inspector
	Metrics             *Metrics
}

func NewHandler

func NewHandler(cm ChainManager, timeWindow time.Duration, mutualTLS bool, metrics *Metrics, expirationCheckDisabled bool) *Handler

func (*Handler) Handle

func (h *Handler) Handle(ctx context.Context, srv *Server) error

type Inspector

type Inspector interface {
	Inspect(context.Context, proto.Message) error
}

type InspectorFunc

type InspectorFunc func(context.Context, proto.Message) error

func (InspectorFunc) Inspect

func (inspector InspectorFunc) Inspect(ctx context.Context, p proto.Message) error

type Metrics

type Metrics struct {
	StreamsOpened     metrics.Counter
	StreamsClosed     metrics.Counter
	RequestsReceived  metrics.Counter
	RequestsCompleted metrics.Counter
	BlocksSent        metrics.Counter
}

func NewMetrics

func NewMetrics(p metrics.Provider) *Metrics

type PolicyChecker

type PolicyChecker interface {
	CheckPolicy(envelope *cb.Envelope, channelID string) error
}

type PolicyCheckerFunc

type PolicyCheckerFunc func(envelope *cb.Envelope, channelID string) error

func (PolicyCheckerFunc) CheckPolicy

func (pcf PolicyCheckerFunc) CheckPolicy(envelope *cb.Envelope, channelID string) error

type Receiver

type Receiver interface {
	Recv() (*cb.Envelope, error)
}

type ResponseSender

type ResponseSender interface {
	SendStatusResponse(status cb.Status) error

	SendBlockResponse(data *cb.Block, channelID string, chain Chain, signedData *protoutil.SignedData) error

	DataType() string
}

type Server

type Server struct {
	Receiver
	PolicyChecker
	ResponseSender
}

type SessionAccessControl

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

func NewSessionAC

func NewSessionAC(chain ConfigSequencer, env *common.Envelope, policyChecker PolicyChecker, channelID string, expiresAt ExpiresAtFunc) (*SessionAccessControl, error)

func (*SessionAccessControl) Evaluate

func (ac *SessionAccessControl) Evaluate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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