synctoken

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache contains a collection of sync token values. Methods on Cache are safe for concurrent use. Don't use this type directly, use NewCache() instead.

func NewCache

func NewCache() *Cache

NewCache creates a new instance of Cache.

func (*Cache) Get

func (s *Cache) Get() string

Get returns a sync token representing the current state of the cache. Format is "<id1>=<value1>,<id2>=<value2>,..."

func (*Cache) Set

func (s *Cache) Set(syncToken exported.SyncToken) error

Set adds or updates the cache with the provided sync token.

type Policy

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

Policy is a pipeline policy for managing Sync-Token values in HTTP requests and responses. Don't use this type directly, use NewPolicy() instead.

func NewPolicy

func NewPolicy(cache *Cache) *Policy

NewPolicy creates a new instance of Policy.

func (*Policy) Do

func (p *Policy) Do(req *policy.Request) (*http.Response, error)

Do implements the policy.Policy interface on type Policy.

Jump to

Keyboard shortcuts

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