Initial commit

This commit is contained in:
Ian Gulliver
2023-05-30 20:12:12 -07:00
parent 8e46ccdea0
commit 453d73c245
7 changed files with 132 additions and 0 deletions

23
elect.go Normal file
View File

@@ -0,0 +1,23 @@
package elect
import (
"github.com/dchest/uniuri"
"github.com/go-resty/resty/v2"
)
type Elect struct {
client *resty.Client
instanceID string
signingKey string
}
func New(url string, signingKey string) *Elect {
e := &Elect{
client: resty.New().
SetBaseURL(url),
instanceID: uniuri.New(),
signingKey: signingKey,
}
return e
}