savers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

This package provides savers for the package github.com/twinj/uuid RFC4122 and DCE 1.1 UUIDs.

Use this package for V1 and V2 UUIDs or your own UUID implementation.

By applying a savers you can store any UUID generation data in a non volatile store, the purpose of which is to save the clock sequence, last timestamp and the last node id used from the last generated UUID.

The Saver Save method is called every time you generate a V1 or V2 UUID.

You do not have to register a savers. The code will generate a random clock sequence or node id if required. The example code in the specification was used as reference for design.

Copyright (C) 2016 twinj@github.com 2014 MIT licence

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSystemSaver

type FileSystemSaver struct {

	// Preferred location for the store
	Path string

	// Whether to log each save
	Report bool

	// The amount of time between each save call
	time.Duration

	// The next time to save
	uuid.Timestamp
	// contains filtered or unexported fields
}

This implements the Saver interface for UUIDs

func (*FileSystemSaver) Read

func (o *FileSystemSaver) Read() (err error, store uuid.Store)

func (*FileSystemSaver) Save

func (o *FileSystemSaver) Save(pStore uuid.Store)

Jump to

Keyboard shortcuts

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