request

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Context   context.Context
	Now       time.Time
	RequestID string
}

Request contains metadata about an indivdual request.

func NewBasicRequest

func NewBasicRequest(ctx context.Context) *Request

NewBasicRequest will create a new Request.

type StateRequest

type StateRequest struct {
	Request
	LimitIDsByKey map[string][]string
	LimitsByKey   []*psc.LimitsByKey
}

StateRequest contains metadata about an indivdual state request.

func NewFinishStateRequest

func NewFinishStateRequest(ctx context.Context, requestID string) *StateRequest

NewFinishStateRequest will create a new StateRequest for a state finish.

func NewStartStateRequest

func NewStartStateRequest(ctx context.Context, limitIDsByKey map[string][]string) *StateRequest

NewStartStateRequest will create a new StateRequest for a state check or peek.

func NewStateRequest

func NewStateRequest(ctx context.Context, requestID string, now time.Time, limitIDsByKey map[string][]string) *StateRequest

NewStateRequest will create a new StateRequest with the provided parameters.

func (*StateRequest) GetLimitIDsForHydration

func (r *StateRequest) GetLimitIDsForHydration() []string

GetLimitIDsForHydration will get the Limit IDs for hydration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳