pinger

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package pinger contains structure and functions for checking chain code accessibility

Index

Constants

View Source
const (
	// PingsStatePrefix prefix for PingInfo composite key in chain code state
	PingKeyPrefix = `PING`
	// PingEvent event name
	PingEvent = `PING`
	// FuncPingConstant func name
	FuncPingConstant = `pingLocal`
	// FuncPing func name
	FuncPing = `ping`
	// FuncPings func name
	FuncPings = `pings`
)

Variables

This section is empty.

Functions

func Ping

func Ping(c r.Context) (interface{}, error)

Ping chaincode func puts tx creator information into chaincode state can be used for checking endorsement policy is working

func PingConstant

func PingConstant(c r.Context) (interface{}, error)

PingConstant chaincode func returns invoker information can be used for testing that chain code is installed and instantiated

func Pings

func Pings(c r.Context) (interface{}, error)

Pings chain code func returns pings from chain code state

Types

type PingInfo

type PingInfo struct {
	Time        time.Time
	InvokerID   string
	InvokerCert []byte
}

PingInfo stores time and certificate of ping tx creator

func FromContext

func FromContext(c r.Context) (*PingInfo, error)

FromContext create PingInfo struct with tx creator Id and certificate in PEM format

func (PingInfo) Key

func (p PingInfo) Key() ([]string, error)

Jump to

Keyboard shortcuts

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