-
Notifications
You must be signed in to change notification settings - Fork 11
/
options.go
45 lines (38 loc) · 1.04 KB
/
options.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
package provider
type ProviderHandler func(*WasmcloudProvider) error
func SourceLinkPut(inFunc func(InterfaceLinkDefinition) error) ProviderHandler {
return func(wp *WasmcloudProvider) error {
wp.putSourceLinkFunc = inFunc
return nil
}
}
func TargetLinkPut(inFunc func(InterfaceLinkDefinition) error) ProviderHandler {
return func(wp *WasmcloudProvider) error {
wp.putTargetLinkFunc = inFunc
return nil
}
}
func SourceLinkDel(inFunc func(InterfaceLinkDefinition) error) ProviderHandler {
return func(wp *WasmcloudProvider) error {
wp.delSourceLinkFunc = inFunc
return nil
}
}
func TargetLinkDel(inFunc func(InterfaceLinkDefinition) error) ProviderHandler {
return func(wp *WasmcloudProvider) error {
wp.delTargetLinkFunc = inFunc
return nil
}
}
func Shutdown(inFunc func() error) ProviderHandler {
return func(wp *WasmcloudProvider) error {
wp.shutdownFunc = inFunc
return nil
}
}
func HealthCheck(inFunc func() string) ProviderHandler {
return func(wp *WasmcloudProvider) error {
wp.healthMsgFunc = inFunc
return nil
}
}