actions

package
Version: v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package actions provides boutique.Actions to signal modifications to the store.

Index

Constants

View Source
const (
	// ActNameSet indicates we are going to change the VarState.Name field.
	ActNameSet boutique.ActionType = iota
	// ActIntSet indicates we are going to change the VarState.Int to a specific number.
	ActIntSet
	// ActIntAdd indicates we are going to change the VarState.Int by adding
	// to its existing value.
	ActIntAdd
	// ActFloatSet indicates we are going to change the VarState.Float to a specific number.
	ActFloatSet
	// ActFloatadd indicates we are going to change the VarState.Float by adding
	// to its existing value.
	ActFloatAdd
	// ActString indicates we are going to change the VarState.String .
	ActString
	// ActMapStore indicates we are adding a key/value to the VarState.Map .
	ActMapStore
	// ActMapDelete indicates we are removing a key/value from the VarState.Map .
	ActMapDelete
	// ActMapReplace indicates we are replacing the VarState.Map .
	ActMapReplace
	// ActNoOp indicates to increment the NoOp field.
	ActNoOp
)

Variables

This section is empty.

Functions

func DeleteMap

func DeleteMap(k string) boutique.Action

DeleteMap produces an Action that will delete a key/value pair in the VarState.Map field.

func FloatAdd

func FloatAdd(f float64) boutique.Action

FloatAdd produces an Action that will change the VarState.Float field by adding to its value.

func FloatSet

func FloatSet(f float64) boutique.Action

FloatSet produces an Action that will change the VarState.Float field by setting its value.

func IntAdd

func IntAdd(i int64) boutique.Action

IntAdd produces an Action that will change its value by adding to its value.

func IntSet

func IntSet(i int64) boutique.Action

IntSet produces an Action that will change the VarState.Int field by setting its value.

func NameSet

func NameSet(n string) boutique.Action

NameSet produces an Action that will change the VarState.Name field.

func NoOp

func NoOp() boutique.Action

NoOp causes the NoOp field to be incremented.

func ReplaceMap

func ReplaceMap(m map[string]expvar.Var) boutique.Action

ReplaceMap produces an Action that will replace the map in the VarState.Map field.

func StoreMap

func StoreMap(k string, v expvar.Var) boutique.Action

StoreMap produces an Action that will store a key/value pair in the VarState.Map field. If the key exists, it will be changed to the new value.

func String

func String(s string) boutique.Action

String produces an Action that will change the VarState.String field.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL