invoke

package
v0.0.0-...-e04e7a0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const SavingBatchSize = 10

Variables

View Source
var SavingQueue = make(chan SaveArgs, 20000)

Use a dedicated channel for saving to the cache in UpperBound mode

Functions

func AssertInvokeHit

func AssertInvokeHit[T interface{}](ctx context.Context, app string, method string, input interface{}) T

Used for cache experiments

func CheckCache

func CheckCache(ctx context.Context, app string, method string, buf []byte) (cm.ReturnVal, bool)

CheckCache checks if cache hit, return (value in cache, if hit)

func CheckCacheShard

func CheckCacheShard(ctx context.Context, app string, method string, buf []byte) (cm.ReturnVal, int, bool)

func Invoke

func Invoke[T interface{}](ctx context.Context, app string, method string, input interface{}) T

func InvokeHit

func InvokeHit(ctx context.Context, app string, method string, input interface{})

func InvokeMiss

func InvokeMiss[T interface{}](ctx context.Context, app string, method string, input interface{})

func InvokeMissVal

func InvokeMissVal[T interface{}](ctx context.Context, app string, method string, input interface{}) T

func Invoke_deprecated

func Invoke_deprecated[T interface{}](ctx context.Context, app string, method string, input interface{}) T

func Invoke_deprecated2

func Invoke_deprecated2[T interface{}](ctx context.Context, app string, method string, input interface{}) T

func OffloadSave

func OffloadSave()

func PollUntilMiss

func PollUntilMiss(ctx context.Context, app string, method string, input interface{})

func ShardInvoke

func ShardInvoke[T interface{}](ctx context.Context, app string, method string, input interface{}) T

Types

type SaveArgs

type SaveArgs struct {
	Ca     cm.CallArgs
	RetVal cm.ReturnVal
}

Jump to

Keyboard shortcuts

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