mirror of
https://github.com/mentos1386/zdravko.git
synced 2024-11-25 17:05:21 +00:00
15 lines
309 B
Go
15 lines
309 B
Go
|
package internal
|
||
|
|
||
|
import (
|
||
|
"code.tjo.space/mentos1386/zdravko/internal/config"
|
||
|
"go.temporal.io/sdk/client"
|
||
|
)
|
||
|
|
||
|
func ConnectToTemporal(cfg *config.Config) (client.Client, error) {
|
||
|
c, err := client.Dial(client.Options{HostPort: cfg.Temporal.ServerHost})
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return c, nil
|
||
|
}
|