diff --git a/go.mod b/go.mod index 627e85c4..0699b42b 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/atrox/haikunatorgo/v2 v2.0.1 github.com/caddyserver/certmagic v0.19.2 github.com/casbin/casbin/v2 v2.77.2 - github.com/datarhei/core-client-go/v16 v16.11.1-0.20230809104853-391c13f9d400 + github.com/datarhei/core-client-go/v16 v16.11.1-0.20230920220938-7a37b8ea80ef github.com/datarhei/gosrt v0.5.4 github.com/datarhei/joy4 v0.0.0-20230505074825-fde05957445a github.com/fujiwara/shapeio v1.0.0 diff --git a/go.sum b/go.sum index 8d1e658c..10d2d7de 100644 --- a/go.sum +++ b/go.sum @@ -46,8 +46,8 @@ github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/datarhei/core-client-go/v16 v16.11.1-0.20230809104853-391c13f9d400 h1:xk4R13HF2vdG3aXKQ3Bce7hBMDnjBGC+HU4daun4wJI= -github.com/datarhei/core-client-go/v16 v16.11.1-0.20230809104853-391c13f9d400/go.mod h1:3eKfwhPKoW7faTn+luShRVNMqcIskvlIKjRJ7ShjyL8= +github.com/datarhei/core-client-go/v16 v16.11.1-0.20230920220938-7a37b8ea80ef h1:6uBGPAbVZpg6/BxJQ/5sM35YbyXVKI+6oD30eEX0V2k= +github.com/datarhei/core-client-go/v16 v16.11.1-0.20230920220938-7a37b8ea80ef/go.mod h1:3eKfwhPKoW7faTn+luShRVNMqcIskvlIKjRJ7ShjyL8= github.com/datarhei/gosrt v0.5.4 h1:dE3mmSB+n1GeviGM8xQAW3+UD3mKeFmd84iefDul5Vs= github.com/datarhei/gosrt v0.5.4/go.mod h1:MiUCwCG+LzFMzLM/kTA+3wiTtlnkVvGbW/F0XzyhtG8= github.com/datarhei/joy4 v0.0.0-20230505074825-fde05957445a h1:Tf4DSHY1xruBglr+yYP5Wct7czM86GKMYgbXH8a7OFo= diff --git a/vendor/github.com/datarhei/core-client-go/v16/api/avstream.go b/vendor/github.com/datarhei/core-client-go/v16/api/avstream.go index 8d461db4..a98d03cb 100644 --- a/vendor/github.com/datarhei/core-client-go/v16/api/avstream.go +++ b/vendor/github.com/datarhei/core-client-go/v16/api/avstream.go @@ -19,4 +19,5 @@ type AVstream struct { LoopingRuntime uint64 `json:"looping_runtime" format:"uint64"` Duplicating bool `json:"duplicating"` GOP string `json:"gop"` + Mode string `json:"mode"` } diff --git a/vendor/github.com/datarhei/core-client-go/v16/api/config.go b/vendor/github.com/datarhei/core-client-go/v16/api/config.go index bf2df4e2..fcfffe50 100644 --- a/vendor/github.com/datarhei/core-client-go/v16/api/config.go +++ b/vendor/github.com/datarhei/core-client-go/v16/api/config.go @@ -368,8 +368,12 @@ type ConfigV3 struct { Username string `json:"username"` // Deprecated, use IAM Password string `json:"password"` // Deprecated, use IAM } `json:"auth"` // Deprecated, use IAM - Size int64 `json:"max_size_mbytes" format:"int64"` - Purge bool `json:"purge"` + Size int64 `json:"max_size_mbytes" format:"int64"` + Purge bool `json:"purge"` + Backup struct { + Dir string `json:"dir"` + Patterns []string `json:"patterns"` + } `json:"backup"` } `json:"memory"` S3 []S3Storage `json:"s3"` CORS struct { diff --git a/vendor/github.com/datarhei/core-client-go/v16/api/iam.go b/vendor/github.com/datarhei/core-client-go/v16/api/iam.go index cc2c7c65..18c9217e 100644 --- a/vendor/github.com/datarhei/core-client-go/v16/api/iam.go +++ b/vendor/github.com/datarhei/core-client-go/v16/api/iam.go @@ -1,6 +1,8 @@ package api type IAMUser struct { + CreatedAt int64 `json:"created_at" format:"int64"` + UpdatedAt int64 `json:"updated_at" format:"int64"` Name string `json:"name"` Alias string `json:"alias"` Superuser bool `json:"superuser"` @@ -38,6 +40,7 @@ type IAMAuth0Tenant struct { type IAMPolicy struct { Name string `json:"name,omitempty"` Domain string `json:"domain"` + Types []string `json:"types"` Resource string `json:"resource"` Actions []string `json:"actions"` } diff --git a/vendor/github.com/datarhei/core-client-go/v16/client.go b/vendor/github.com/datarhei/core-client-go/v16/client.go index b1962346..820af6d7 100644 --- a/vendor/github.com/datarhei/core-client-go/v16/client.go +++ b/vendor/github.com/datarhei/core-client-go/v16/client.go @@ -123,15 +123,16 @@ type RestClient interface { ClusterDBKeyValues() (api.ClusterKVS, error) // GET /v3/cluster/db/kv ClusterDBProcessMap() (api.ClusterProcessMap, error) // GET /v3/cluster/db/map/process - ClusterProcessList(opts ProcessListOptions) ([]api.Process, error) // GET /v3/cluster/process - ClusterProcess(id ProcessID, filter []string) (api.Process, error) // POST /v3/cluster/process - ClusterProcessAdd(p api.ProcessConfig) error // GET /v3/cluster/process/{id} - ClusterProcessUpdate(id ProcessID, p api.ProcessConfig) error // PUT /v3/cluster/process/{id} - ClusterProcessDelete(id ProcessID) error // DELETE /v3/cluster/process/{id} - ClusterProcessCommand(id ProcessID, command string) error // PUT /v3/cluster/process/{id}/command - ClusterProcessMetadata(id ProcessID, key string) (api.Metadata, error) // GET /v3/cluster/process/{id}/metadata/{key} - ClusterProcessMetadataSet(id ProcessID, key string, metadata api.Metadata) error // PUT /v3/cluster/process/{id}/metadata/{key} - ClusterProcessProbe(id ProcessID) (api.Probe, error) // GET /v3/cluster/process/{id}/probe + ClusterProcessList(opts ProcessListOptions) ([]api.Process, error) // GET /v3/cluster/process + ClusterProcess(id ProcessID, filter []string) (api.Process, error) // POST /v3/cluster/process + ClusterProcessAdd(p api.ProcessConfig) error // GET /v3/cluster/process/{id} + ClusterProcessUpdate(id ProcessID, p api.ProcessConfig) error // PUT /v3/cluster/process/{id} + ClusterProcessDelete(id ProcessID) error // DELETE /v3/cluster/process/{id} + ClusterProcessCommand(id ProcessID, command string) error // PUT /v3/cluster/process/{id}/command + ClusterProcessMetadata(id ProcessID, key string) (api.Metadata, error) // GET /v3/cluster/process/{id}/metadata/{key} + ClusterProcessMetadataSet(id ProcessID, key string, metadata api.Metadata) error // PUT /v3/cluster/process/{id}/metadata/{key} + ClusterProcessProbe(id ProcessID) (api.Probe, error) // GET /v3/cluster/process/{id}/probe + ClusterProcessProbeConfig(config api.ProcessConfig, coreid string) (api.Probe, error) // POST /v3/cluster/process/probe ClusterIdentitiesList() ([]api.IAMUser, error) // GET /v3/cluster/iam/user ClusterIdentity(name string) (api.IAMUser, error) // GET /v3/cluster/iam/user/{name} @@ -446,6 +447,10 @@ func New(config Config) (RestClient, error) { path: mustNewGlob("/v3/process/probe"), constraint: mustNewConstraint("^16.14.0"), }, + { + path: mustNewGlob("/v3/cluster/process/probe"), + constraint: mustNewConstraint("^16.14.0"), + }, }, "PUT": { { diff --git a/vendor/github.com/datarhei/core-client-go/v16/cluster_process.go b/vendor/github.com/datarhei/core-client-go/v16/cluster_process.go index b84ab1ed..0d73d97b 100644 --- a/vendor/github.com/datarhei/core-client-go/v16/cluster_process.go +++ b/vendor/github.com/datarhei/core-client-go/v16/cluster_process.go @@ -37,3 +37,7 @@ func (r *restclient) ClusterProcessMetadataSet(id ProcessID, key string, metadat func (r *restclient) ClusterProcessProbe(id ProcessID) (api.Probe, error) { return r.processProbe("cluster", id) } + +func (r *restclient) ClusterProcessProbeConfig(config api.ProcessConfig, coreid string) (api.Probe, error) { + return r.processProbeConfig("cluster", config, coreid) +} diff --git a/vendor/github.com/datarhei/core-client-go/v16/iam.go b/vendor/github.com/datarhei/core-client-go/v16/iam.go index 2408b922..004d372d 100644 --- a/vendor/github.com/datarhei/core-client-go/v16/iam.go +++ b/vendor/github.com/datarhei/core-client-go/v16/iam.go @@ -102,9 +102,9 @@ func (r *restclient) identitySetPolicies(where, name string, p []api.IAMPolicy) } func (r *restclient) identityDelete(where, name string) error { - path := "/v3/iam/user" + url.PathEscape(name) + path := "/v3/iam/user/" + url.PathEscape(name) if where == "cluster" { - path = "/v3/cluster/iam/user" + url.PathEscape(name) + path = "/v3/cluster/iam/user/" + url.PathEscape(name) } _, err := r.call("DELETE", path, nil, nil, "", nil) diff --git a/vendor/github.com/datarhei/core-client-go/v16/process.go b/vendor/github.com/datarhei/core-client-go/v16/process.go index 17ec0ce0..fbb8d971 100644 --- a/vendor/github.com/datarhei/core-client-go/v16/process.go +++ b/vendor/github.com/datarhei/core-client-go/v16/process.go @@ -250,12 +250,18 @@ func (r *restclient) processProbe(where string, id ProcessID) (api.Probe, error) return p, err } -func (r *restclient) processProbeConfig(where string, config api.ProcessConfig) (api.Probe, error) { +func (r *restclient) processProbeConfig(where string, config api.ProcessConfig, coreid string) (api.Probe, error) { var p api.Probe + query := &url.Values{} + path := "/v3/process/probe" if where == "cluster" { path = "/v3/cluster/process/probe" + + if len(coreid) != 0 { + query.Set("coreid", coreid) + } } var buf bytes.Buffer @@ -263,7 +269,7 @@ func (r *restclient) processProbeConfig(where string, config api.ProcessConfig) e := json.NewEncoder(&buf) e.Encode(config) - data, err := r.call("POST", path, nil, nil, "application/json", &buf) + data, err := r.call("POST", path, query, nil, "application/json", &buf) if err != nil { return p, err } @@ -310,7 +316,7 @@ func (r *restclient) ProcessProbe(id ProcessID) (api.Probe, error) { } func (r *restclient) ProcessProbeConfig(config api.ProcessConfig) (api.Probe, error) { - return r.processProbeConfig("", config) + return r.processProbeConfig("", config, "") } func (r *restclient) ProcessConfig(id ProcessID) (api.ProcessConfig, error) { diff --git a/vendor/modules.txt b/vendor/modules.txt index 5ff8e9d6..42d44cab 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -78,7 +78,7 @@ github.com/cespare/xxhash/v2 # github.com/cpuguy83/go-md2man/v2 v2.0.2 ## explicit; go 1.11 github.com/cpuguy83/go-md2man/v2/md2man -# github.com/datarhei/core-client-go/v16 v16.11.1-0.20230809104853-391c13f9d400 +# github.com/datarhei/core-client-go/v16 v16.11.1-0.20230920220938-7a37b8ea80ef ## explicit; go 1.18 github.com/datarhei/core-client-go/v16 github.com/datarhei/core-client-go/v16/api