Documentation
¶
Index ¶
- Constants
- func InternalCall(ctx biz.Context, app string, version int, module, handler string, ...) error
- func InternalInvoke[RESULT any](ctx biz.Context, app string, version int, module, handler string, ...) (*RESULT, error)
- func NewEvent(pubsubName, topic string, handler common.TopicEventHandler, args ...bool) event
- type APIer
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 内部调用, 不返回结果
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)
}
Click to show internal directories.
Click to hide internal directories.