Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateRendezvousPointForPeriod(topic, seed []byte, date time.Time) []byte
- func NextTimePeriod(date time.Time, interval time.Duration) time.Time
- func RoundTimePeriod(date time.Time, interval time.Duration) time.Time
- type Point
- func (p *Point) Deadline() time.Time
- func (p *Point) IsExpired() bool
- func (p *Point) NextPoint() *Point
- func (p *Point) RawRotationTopic() []byte
- func (p *Point) RawTopic() []byte
- func (p *Point) RotationTopic() string
- func (p *Point) Seed() []byte
- func (p *Point) TTL() time.Duration
- func (p *Point) Topic() string
- type RotationInterval
- func (r *RotationInterval) NewRendezvousPointForPeriod(at time.Time, topic string, seed []byte) (point *Point)
- func (r *RotationInterval) NextTimePeriod(at time.Time) time.Time
- func (r *RotationInterval) PointForRawRotation(rotation []byte) (*Point, error)
- func (r *RotationInterval) PointForRotation(rotation string) (*Point, error)
- func (r *RotationInterval) PointForTopic(topic string) (*Point, error)
- func (r *RotationInterval) RegisterRotation(at time.Time, topic string, seed []byte)
- func (r *RotationInterval) RoundTimePeriod(at time.Time) time.Time
Constants ¶
View Source
const DefaultRotationInterval = time.Hour * 24
Variables ¶
View Source
var ( RotationGracePeriod = time.Minute * 10 MinimumDelayRotation = time.Minute )
Functions ¶
Types ¶
type Point ¶ added in v2.367.0
type Point struct {
// contains filtered or unexported fields
}
func (*Point) RawRotationTopic ¶ added in v2.367.0
func (*Point) RotationTopic ¶ added in v2.367.0
type RotationInterval ¶ added in v2.367.0
type RotationInterval struct {
// contains filtered or unexported fields
}
func NewRotationInterval ¶ added in v2.367.0
func NewRotationInterval(interval time.Duration) *RotationInterval
func NewStaticRotationInterval ¶ added in v2.367.0
func NewStaticRotationInterval() *RotationInterval
func (*RotationInterval) NewRendezvousPointForPeriod ¶ added in v2.367.0
func (*RotationInterval) NextTimePeriod ¶ added in v2.367.0
func (r *RotationInterval) NextTimePeriod(at time.Time) time.Time
func (*RotationInterval) PointForRawRotation ¶ added in v2.367.0
func (r *RotationInterval) PointForRawRotation(rotation []byte) (*Point, error)
func (*RotationInterval) PointForRotation ¶ added in v2.367.0
func (r *RotationInterval) PointForRotation(rotation string) (*Point, error)
func (*RotationInterval) PointForTopic ¶ added in v2.367.0
func (r *RotationInterval) PointForTopic(topic string) (*Point, error)
func (*RotationInterval) RegisterRotation ¶ added in v2.367.0
func (r *RotationInterval) RegisterRotation(at time.Time, topic string, seed []byte)
func (*RotationInterval) RoundTimePeriod ¶ added in v2.367.0
func (r *RotationInterval) RoundTimePeriod(at time.Time) time.Time
Click to show internal directories.
Click to hide internal directories.