Documentation ¶
Index ¶
- 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, connInfo connection.Info, timeout time.Duration) (message.Message, error)
- func UpdateSectionValidity(sec section.WithSig, ...)
- type MaxCacheValidity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
func SendQuery ¶
func SendQuery(msg message.Message, connInfo connection.Info, timeout time.Duration) ( message.Message, error)
SendQuery creates a connection with connInfo, frames msg and writes it to the connection. It then waits for the response. When it receives the response or times out, it returns the answer or an error.
func UpdateSectionValidity ¶
func UpdateSectionValidity(sec section.WithSig, pkeyValidSince, pkeyValidUntil, sigValidSince, sigValidUntil int64, maxVal MaxCacheValidity)
UpdateSectionValidity updates the validity of the section according to the signature validity and the publicKey validity used to verify this signature
Types ¶
type MaxCacheValidity ¶
type MaxCacheValidity struct { AssertionValidity time.Duration ShardValidity time.Duration PhardValidity time.Duration ZoneValidity time.Duration AddressAssertionValidity time.Duration }
MaxCacheValidity defines the maximum duration each section containing signatures can be valid, starting from time.Now()