Documentation
¶
Index ¶
- Constants
- func DeleteState(storeName, key string) error
- func Error(err error) (*common.Content, error)
- func GetMetaValue(ctx context.Context, key string) string
- func GetMetaValues(ctx context.Context, key string) []string
- func GetState(storeName, key string) ([]byte, error)
- func Invoke(appId string, version int, namespace, method string, data interface{}, ...) ([]byte, error)
- func InvokeWithClient(appId string, version int, namespace, client, method string, data interface{}, ...) ([]byte, error)
- func InvokeWithDaprClient(daprClient client.Client, appId, methodName string, data interface{}, ...) ([]byte, error)
- func ParseHandlers(registry map[string]map[string]common.ServiceInvocationHandler) map[string]common.ServiceInvocationHandler
- func Publish(pubSubName, topic string, data interface{}, args ...bool) error
- func RegisterHandlers(app string, holder interface{}, ...) error
- func SaveState(storeName, key string, value interface{}) error
- func Success(event *common.InvocationEvent, resp interface{}) (*common.Content, error)
- type Event
Constants ¶
View Source
const ContentTypeJson = "application/json"
Variables ¶
This section is empty.
Functions ¶
func GetMetaValue ¶
GetMetaValue get the first grpc meta value
func GetMetaValues ¶
GetMetaValues get grpc meta values
func Invoke ¶
func Invoke(appId string, version int, namespace, method string, data interface{}, args ...string) ([]byte, error)
Invoke 调用dapr服务
func InvokeWithClient ¶
func InvokeWithClient(appId string, version int, namespace, client, method string, data interface{}, args ...string) ([]byte, error)
InvokeWithClient 调用dapr服务
func InvokeWithDaprClient ¶
func InvokeWithDaprClient(daprClient client.Client, appId, methodName string, data interface{}, args ...string) ([]byte, error)
InvokeWithDaprClient 需要传入daprClient去调用
func ParseHandlers ¶
func ParseHandlers(registry map[string]map[string]common.ServiceInvocationHandler) map[string]common.ServiceInvocationHandler
ParseHandlers parse handlers from registry
func RegisterHandlers ¶
func RegisterHandlers(app string, holder interface{}, methods map[string]common.ServiceInvocationHandler, registry map[string]map[string]common.ServiceInvocationHandler) error
RegisterHandlers register namespace's method to global registry
Types ¶
type Event ¶
type Event struct { Subscription *common.Subscription Handler common.TopicEventHandler }
Click to show internal directories.
Click to hide internal directories.