api

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ContentTypeJson = "application/json"

Variables

This section is empty.

Functions

func InternalCall

func InternalCall(ctx biz.Context, app string, version int, module, handler string, request ...any) error

InternalCall 内部调用, 不返回结果

func InternalInvoke

func InternalInvoke[RESULT any](ctx biz.Context, app string, version int, module, handler string, request ...any) (*RESULT, error)

InternalInvoke 内部调用, 返回结果

func NewEvent

func NewEvent(pubsubName, topic string, handler common.TopicEventHandler, args ...bool) event

Types

type APIer

type APIer interface {
	Invoke(app string, apiVersion int, module string, handler string, data any, source ...string) ([]byte, error)
	Lock(lockStore, lockOwner, resource string, expiryInSeconds int) error
	Unlock(lockStore, lockOwner, resource string) error
	Publish(pubSubName, topic string, data interface{}, args ...bool) error
	SaveState(storeName, key string, value interface{}) error
	GetState(storeName, key string) ([]byte, error)
	DeleteState(storeName, key string) error
	GetConfigurationItems(configStore string, keys []string) (map[string]*client.ConfigurationItem, error)
	SubscribeConfigurationItems(ctx context.Context, configStore string, keys []string, handler client.ConfigurationHandleFunction) (string, error)
	GetBulkState(storeName string, keys any) (map[string][]byte, error)
}

func New

func New(ctx biz.Context) APIer

Jump to

Keyboard shortcuts

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