types

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

README

Otoroshi Types for writing Wasm plugin using Go

package main

import (
    "github.com/MAIF/otoroshi-go-types"
)

//export greet
func greet() {}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteArrPtr

func ByteArrPtr(arr []byte) uint64

func ClusterState

func ClusterState() []byte

func ClusterStateField

func ClusterStateField(field string) []byte

func EmptyResult

func EmptyResult() int32

func GetClusterState

func GetClusterState(context uint64) uint64

func GetClusterStateValue

func GetClusterStateValue(context uint64, contextSize uint64) uint64

func GetProxyState

func GetProxyState(context uint64) uint64

func GetProxyStateValue

func GetProxyStateValue(context uint64, contextSize uint64) uint64

func ProxyDataStoreAllMatching

func ProxyDataStoreAllMatching(key string) []byte

func ProxyDataStoreDel

func ProxyDataStoreDel(keys ...string)

func ProxyDataStoreExists

func ProxyDataStoreExists(key string) bool

func ProxyDataStoreGet

func ProxyDataStoreGet(key string) []byte

func ProxyDataStoreIncrby

func ProxyDataStoreIncrby(key string, incr int)

func ProxyDataStorePexpire

func ProxyDataStorePexpire(key string, pttl int64)

func ProxyDataStorePttl

func ProxyDataStorePttl(key string) uint64

func ProxyDataStoreSetnx

func ProxyDataStoreSetnx(value []byte)

func ProxyDatastoreKeys

func ProxyDatastoreKeys(key string) []byte

func ProxyGlobalMap

func ProxyGlobalMap() map[string][]byte

func ProxyGlobalMapGet

func ProxyGlobalMapGet(key string) []byte

func ProxyGlobalMapSet

func ProxyGlobalMapSet(key string, value string)

GLOBAL PLUGIN MAP

func ProxyHttpCall

func ProxyHttpCall(context uint64, contextSize uint64) uint64

func ProxyPluginDataStoreAllMatching

func ProxyPluginDataStoreAllMatching(key string) []byte

func ProxyPluginDataStoreDel

func ProxyPluginDataStoreDel(keys ...string)

func ProxyPluginDataStoreExists

func ProxyPluginDataStoreExists(key string) bool

func ProxyPluginDataStoreGet

func ProxyPluginDataStoreGet(key string) []byte

func ProxyPluginDataStoreIncrby

func ProxyPluginDataStoreIncrby(key string, incr int)

func ProxyPluginDataStorePexpire

func ProxyPluginDataStorePexpire(key string, pttl int64)

func ProxyPluginDataStorePttl

func ProxyPluginDataStorePttl(key string) uint64

func ProxyPluginDataStoreSetnx

func ProxyPluginDataStoreSetnx(value []byte)

func ProxyPluginDatastoreKeys

func ProxyPluginDatastoreKeys(key string) []byte

func ProxyPluginMap

func ProxyPluginMap() map[string][]byte

func ProxyPluginMapGet

func ProxyPluginMapGet(key string) []byte

func ProxyPluginMapSet

func ProxyPluginMapSet(key string, value string)

PLUGIN MAP

func ProxyState

func ProxyState() []byte

func ProxyStateEntities

func ProxyStateEntities(entity string) []byte

func ProxyStateEntity

func ProxyStateEntity(entity string, id string) []byte

func StringBytePtr

func StringBytePtr(msg string) uint64

func TestResult

func TestResult() int32

Types

type LogLevel

type LogLevel uint32
const (
	LogLevelTrace LogLevel = iota
	LogLevelDebug
	LogLevelInfo
	LogLevelWarn
	LogLevelError
	LogLevelCritical
	LogLevelMax
)

func (LogLevel) String

func (bp LogLevel) String() string

type Status

type Status uint32
const (
	StatusOK Status = iota
	StatusNotFound
	StatusBadArgument
	StatusEmpty
	StatusCasMismatch
	StatusInternalFailure
	StatusUnimplemented
)

func Log

func Log(logLevel LogLevel, message string) Status

func LogBool

func LogBool(logLevel LogLevel, message bool) Status

func LogBytes

func LogBytes(logLevel LogLevel, message []byte) Status

func LogEvent

func LogEvent(function string, message string, level LogLevel) Status

func LogLong

func LogLong(logLevel LogLevel, message uint64) Status

func ProxyLog

func ProxyLog(logLevel LogLevel, messageData uint64, messageSize uint64) Status

func ProxyLogEvent

func ProxyLogEvent(context uint64, contextSize uint64) Status

func (Status) String

func (bp Status) String() string

Jump to

Keyboard shortcuts

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