Version: v0.1.0 Latest Latest

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

Go to latest
Published: Feb 15, 2016 License: Apache-2.0 Imports: 7 Imported by: 364




This section is empty.


This section is empty.


func ComputeCryptoHash

func ComputeCryptoHash(data []byte) (hash []byte)

ComputeCryptoHash should be used in openchain code so that we can change the actual algo used for crypto-hash at one place

func CreateUtcTimestamp

func CreateUtcTimestamp() *gp.Timestamp

CreateUtcTimestamp returns a google/protobuf/Timestamp in UTC

func GenerateUUID

func GenerateUUID() string

GenerateUUID returns a UUID based on RFC 4112


type Queue

type Queue struct {
	// contains filtered or unexported fields

Queue is a classic implmentation of a FIFO queue object

func NewQueue

func NewQueue() *Queue

NewQueue is a constructor returning a Queue object

func (*Queue) Peek

func (q *Queue) Peek() interface{}

Peek returns the data at the head of the queue

func (*Queue) Pop

func (q *Queue) Pop() interface{}

Pop returns the data item at the head of the queue Example e := q.Pop().(T) -- cast e to type T

func (*Queue) Push

func (q *Queue) Push(item interface{})

Push appends an item on the queue @param item - any application data

func (*Queue) Size

func (q *Queue) Size() int

Size returns the number of elements on the queue

Source Files

Jump to

Keyboard shortcuts

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