session

package
v3.17.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package session provides functions for sessions of incoming requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithID

func ContextWithID(ctx context.Context, id ID) context.Context

ContextWithID returns a new context with the given ID.

Types

type ID

type ID uint32

ID of a session.

func IDFromContext

func IDFromContext(ctx context.Context) ID

IDFromContext returns ID in this context, or 0 if not contained.

func NewID

func NewID() ID

NewID generates a new ID. The generated ID is high likely to be unique, but not cryptographically secure. The generated ID will never be 0.

Jump to

Keyboard shortcuts

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