-
Notifications
You must be signed in to change notification settings - Fork 1
/
greetings_temporal.pb.go
56 lines (46 loc) · 1.52 KB
/
greetings_temporal.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Code generated by protoc-gen-go-activity. DO NOT EDIT.
package greetingspb
import (
context "context"
workflow "go.temporal.io/sdk/workflow"
)
type greetings struct{}
// Greetings is for workflows to call for executing activities.
//
// Greetings activities.
var Greetings greetings
// Get the greeting.
func (greetings) GetGreeting(ctx workflow.Context, in *GetGreetingRequest) (out *GetGreetingResponse, err error) {
if in == nil {
in = new(GetGreetingRequest)
}
err = workflow.ExecuteActivity(ctx, "GetGreeting", in).Get(ctx, &out)
return
}
// Get the name.
func (greetings) GetName(ctx workflow.Context, in *GetNameRequest) (out *GetNameResponse, err error) {
if in == nil {
in = new(GetNameRequest)
}
err = workflow.ExecuteActivity(ctx, "GetName", in).Get(ctx, &out)
return
}
// Say the greeting.
func (greetings) SayGreeting(ctx workflow.Context, in *SayGreetingRequest) (out *SayGreetingResponse, err error) {
if in == nil {
in = new(SayGreetingRequest)
}
err = workflow.ExecuteActivity(ctx, "SayGreeting", in).Get(ctx, &out)
return
}
// GreetingsImpl is for activity implementations on workers. The struct that implements this can be passed to RegisterActivity.
//
// Greetings activities.
type GreetingsImpl interface {
// Get the greeting.
GetGreeting(context.Context, *GetGreetingRequest) (*GetGreetingResponse, error)
// Get the name.
GetName(context.Context, *GetNameRequest) (*GetNameResponse, error)
// Say the greeting.
SayGreeting(context.Context, *SayGreetingRequest) (*SayGreetingResponse, error)
}