log

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(a ...interface{})

func Debugf

func Debugf(format string, a ...interface{})

func Error

func Error(a ...interface{})

func Errorf

func Errorf(format string, a ...interface{})

func Fatal

func Fatal(a ...interface{})

func Fatalf

func Fatalf(format string, a ...interface{})

func Info

func Info(a ...interface{})

func Infof

func Infof(format string, a ...interface{})

func Init

func Init(level uint8, maxPerLogSizeMb, maxLogsSizeMb int64)

func Warn

func Warn(a ...interface{})

func Warnf

func Warnf(format string, a ...interface{})

Types

type ConsensusEvent

type ConsensusEvent struct {
	StartTime time.Time
	EndTime   time.Time
	Height    uint32
	RawData   *types.Header
}

type EventListener

type EventListener interface {
	OnProposalArrived(prop *ProposalEvent)
	OnProposalFinished(prop *ProposalEvent)
	OnVoteArrived(vote *VoteEvent)
	OnViewStarted(view *ViewEvent)
	OnConsensusStarted(cons *ConsensusEvent)
	OnConsensusFinished(cons *ConsensusEvent)
}

type EventLogs

type EventLogs struct {
}

func (*EventLogs) OnConsensusFinished

func (e *EventLogs) OnConsensusFinished(cons *ConsensusEvent)

func (*EventLogs) OnConsensusStarted

func (e *EventLogs) OnConsensusStarted(cons *ConsensusEvent)

func (*EventLogs) OnProposalArrived

func (e *EventLogs) OnProposalArrived(prop *ProposalEvent)

func (*EventLogs) OnProposalFinished

func (e *EventLogs) OnProposalFinished(prop *ProposalEvent)

func (*EventLogs) OnViewStarted

func (e *EventLogs) OnViewStarted(view *ViewEvent)

func (*EventLogs) OnVoteArrived

func (e *EventLogs) OnVoteArrived(vote *VoteEvent)

type EventMonitor

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

func NewEventMonitor added in v0.3.0

func NewEventMonitor() *EventMonitor

func (*EventMonitor) OnConsensusFinished

func (e *EventMonitor) OnConsensusFinished(cons *ConsensusEvent)

func (*EventMonitor) OnConsensusStarted

func (e *EventMonitor) OnConsensusStarted(cons *ConsensusEvent)

func (*EventMonitor) OnProposalArrived

func (e *EventMonitor) OnProposalArrived(prop *ProposalEvent)

func (*EventMonitor) OnProposalFinished

func (e *EventMonitor) OnProposalFinished(prop *ProposalEvent)

func (*EventMonitor) OnViewStarted

func (e *EventMonitor) OnViewStarted(view *ViewEvent)

func (*EventMonitor) OnVoteArrived

func (e *EventMonitor) OnVoteArrived(vote *VoteEvent)

func (*EventMonitor) RegisterListener

func (e *EventMonitor) RegisterListener(l EventListener)

func (*EventMonitor) UnregisterListener

func (e *EventMonitor) UnregisterListener(l EventListener)

type ProposalEvent

type ProposalEvent struct {
	Sponsor      string
	BlockHash    common.Uint256
	ReceivedTime time.Time
	EndTime      time.Time
	Result       bool
	ProposalHash common.Uint256
	RawData      *payload.DPOSProposal
}

type ViewEvent

type ViewEvent struct {
	OnDutyArbitrator string
	StartTime        time.Time
	Offset           uint32
	Height           uint32
}

type VoteEvent

type VoteEvent struct {
	Signer       string
	ReceivedTime time.Time
	Result       bool
	RawData      *payload.DPOSProposalVote
}

Jump to

Keyboard shortcuts

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