Documentation ¶
Index ¶
- func GetOverlapValidityForSignatures(sigs []signature.Sig) (int64, int64)
- func Load(path string, object interface{}) error
- func NewNotificationMessage(tok token.Token, t section.NotificationType, data string) message.Message
- func NewNotificationsMessage(tokens []token.Token, types []section.NotificationType, data []string) (message.Message, error)
- func NewQueryMessage(name, context string, expTime int64, objType []object.Type, ...) message.Message
- func Save(path string, object interface{}) error
- func SendQuery(msg message.Message, addr net.Addr, timeout time.Duration) (message.Message, error)
- type MaxCacheValidity
- type MsgSectionSender
- type SectionWithSigSender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOverlapValidityForSignatures ¶
GetOverlapValidityForSignatures returns the union of the validity windows for all signatures Returns 0,0 if no valid window exists (there exist gaps)
func Load ¶
Load fetches the gob encoded object from the file located at path. Make sure that all types that are behind an interface are registered in the init method.
func NewNotificationMessage ¶
func NewNotificationMessage(tok token.Token, t section.NotificationType, data string) message.Message
NewNotificationMessage creates a new message containing one notification body with values obtained from the input parameter
func NewNotificationsMessage ¶
func NewNotificationsMessage(tokens []token.Token, types []section.NotificationType, data []string) (message.Message, error)
NewNotificationsMessage creates a new message containing notification bodies with values obtained from the input parameter
func NewQueryMessage ¶
func NewQueryMessage(name, context string, expTime int64, objType []object.Type, queryOptions []query.Option, token token.Token) message.Message
NewQueryMessage creates a new message containing a query body with values obtained from the input parameter
Types ¶
type MaxCacheValidity ¶
type MaxCacheValidity struct { AssertionValidity time.Duration ShardValidity time.Duration PshardValidity time.Duration ZoneValidity time.Duration }
MaxCacheValidity defines the maximum duration each section containing signatures can be valid, starting from time.Now()
type MsgSectionSender ¶
MsgSectionSender contains the message section section and connection infos about the sender
type SectionWithSigSender ¶
type SectionWithSigSender struct { Sender net.Addr Sections []section.WithSigForward Token token.Token }
SectionWithSigSender contains a section with a signature and connection infos about the sender