seqnum

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package seqnum provides utilities to persistently store sequence number in a file and compare against the stored value to ensure a sequence number is processed only once in the extension handler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSmallerThan

func IsSmallerThan(path string, num int) (bool, error)

IsSmallerThan returns true if the sequence number stored at path is smaller than the provided num. If no number is stored, returns true and no error.

func Set

func Set(path string, num int) error

Set replaces the stored sequence number in file, or creates a new file at path if it does not exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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