dapr

package
v0.0.1-202203141030 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ContentTypeJson = "application/json"

Variables

This section is empty.

Functions

func DeleteState

func DeleteState(storeName, key string) error

DeleteState 删除状态

func GetMetaValue

func GetMetaValue(ctx context.Context, key string) string

GetMetaValue get the first grpc meta value

func GetMetaValues

func GetMetaValues(ctx context.Context, key string) []string

GetMetaValues get grpc meta values

func GetState

func GetState(storeName, key string) ([]byte, error)

GetState 保存状态

func InvokeService

func InvokeService(appId, methodName string, data interface{}, args ...string) ([]byte, error)

InvokeService 调用dapr服务

func InvokeServiceWithClient

func InvokeServiceWithClient(daprClient client.Client, appId, methodName string, data interface{}, args ...string) ([]byte, error)

InvokeServiceWithClient 需要传入daprClient去调用

func Publish

func Publish(pubSubName, topic string, data interface{}) error

Publish 发布消息

func Reply

func Reply(event *common.InvocationEvent, resp proto.Message) *common.Content

Reply dapr reply

func SaveState

func SaveState(storeName, key string, data interface{}) error

SaveState 保存状态

Types

This section is empty.

Jump to

Keyboard shortcuts

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