Skip to content

Commit

Permalink
Merge pull request #536 from ripienaar/placement_schema
Browse files Browse the repository at this point in the history
Placement cluster is optional
  • Loading branch information
ripienaar authored May 17, 2024
2 parents 2690708 + 4d4ae21 commit 0c5579f
Show file tree
Hide file tree
Showing 19 changed files with 29 additions and 74 deletions.
2 changes: 1 addition & 1 deletion api/schemas_generated.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// auto generated 2024-02-13 15:58:31.227879 +0100 CET m=+0.013734209
// auto generated 2024-05-17 16:56:48.242365 +0200 CEST m=+0.023207376

package api

Expand Down
17 changes: 9 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,26 @@ go 1.21

require (
github.com/dustin/go-humanize v1.0.1
github.com/expr-lang/expr v1.16.4
github.com/expr-lang/expr v1.16.7
github.com/google/go-cmp v0.6.0
github.com/klauspost/compress v1.17.8
github.com/nats-io/nats-server/v2 v2.11.0-dev.0.20240410051502-3bb3d44cc23a
github.com/nats-io/nats.go v1.34.1
github.com/nats-io/nats-server/v2 v2.11.0-preview.2
github.com/nats-io/nats.go v1.35.0
github.com/nats-io/nuid v1.0.1
golang.org/x/net v0.24.0
golang.org/x/text v0.14.0
golang.org/x/net v0.25.0
golang.org/x/text v0.15.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/google/go-tpm v0.9.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/nats-io/jwt/v2 v2.5.5 // indirect
github.com/nats-io/jwt/v2 v2.5.7 // indirect
github.com/nats-io/nkeys v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/time v0.5.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
)
40 changes: 18 additions & 22 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/expr-lang/expr v1.16.4 h1:1Mq5RHw5T5jxXMUvyb+eT546mJREm1yFyNHkybYQ81c=
github.com/expr-lang/expr v1.16.4/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ=
github.com/expr-lang/expr v1.16.7 h1:gCIiHt5ODA0xIaDbD0DPKyZpM9Drph3b3lolYAYq2Kw=
github.com/expr-lang/expr v1.16.7/go.mod h1:8/vRC7+7HBzESEqt5kKpYXxrxkr31SaO8r40VO/1IT4=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-tpm v0.9.0 h1:sQF6YqWMi+SCXpsmS3fd21oPy/vSddwZry4JnmltHVk=
github.com/google/go-tpm v0.9.0/go.mod h1:FkNVkc6C+IsvDI9Jw1OveJmxGZUUaKxtrpOS47QWKfU=
github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=
github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
Expand All @@ -18,33 +18,29 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g=
github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
github.com/nats-io/jwt/v2 v2.5.5 h1:ROfXb50elFq5c9+1ztaUbdlrArNFl2+fQWP6B8HGEq4=
github.com/nats-io/jwt/v2 v2.5.5/go.mod h1:ZdWS1nZa6WMZfFwwgpEaqBV8EPGVgOTDHN/wTbz0Y5A=
github.com/nats-io/nats-server/v2 v2.11.0-dev.0.20240410051502-3bb3d44cc23a h1:nDD1tYE9uCjQEkjCB72ufRiBNaR3dssIwn25bXTUR1Y=
github.com/nats-io/nats-server/v2 v2.11.0-dev.0.20240410051502-3bb3d44cc23a/go.mod h1:a0TwOVBJZz6Hwv7JH2E4ONdpyFk9do0C18TEwxnHdRk=
github.com/nats-io/nats.go v1.34.1 h1:syWey5xaNHZgicYBemv0nohUPPmaLteiBEUT6Q5+F/4=
github.com/nats-io/nats.go v1.34.1/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=
github.com/nats-io/jwt/v2 v2.5.7 h1:j5lH1fUXCnJnY8SsQeB/a/z9Azgu2bYIDvtPVNdxe2c=
github.com/nats-io/jwt/v2 v2.5.7/go.mod h1:ZdWS1nZa6WMZfFwwgpEaqBV8EPGVgOTDHN/wTbz0Y5A=
github.com/nats-io/nats-server/v2 v2.11.0-preview.2 h1:tT/UeBbFzHRzwy77T/+/Rbw58XP9F3CY3VmtcDltZ68=
github.com/nats-io/nats-server/v2 v2.11.0-preview.2/go.mod h1:ILDVzrTqMco4rQMOgEZimBjJHb1oZDlz1J+qhJtZlRM=
github.com/nats-io/nats.go v1.35.0 h1:XFNqNM7v5B+MQMKqVGAyHwYhyKb48jrenXNxIU20ULk=
github.com/nats-io/nats.go v1.35.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=
github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI=
github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc=
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
1 change: 1 addition & 0 deletions natscontext/signer.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package natscontext
1 change: 0 additions & 1 deletion schema_source/jetstream/api/v1/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@
"placement": {
"type": "object",
"description": "Placement requirements for a stream",
"required": ["cluster"],
"properties": {
"cluster": {
"type": "string",
Expand Down
3 changes: 0 additions & 3 deletions schemas/jetstream/api/v1/meta_leader_stepdown_request.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"placement": {
"type": "object",
"description": "Placement requirements for a stream",
"required": [
"cluster"
],
"properties": {
"cluster": {
"type": "string",
Expand Down
3 changes: 0 additions & 3 deletions schemas/jetstream/api/v1/stream_configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,6 @@
"placement": {
"description": "Placement directives to consider when placing replicas of this stream, random placement when unset",
"type": "object",
"required": [
"cluster"
],
"properties": {
"cluster": {
"type": "string",
Expand Down
3 changes: 0 additions & 3 deletions schemas/jetstream/api/v1/stream_create_request.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,6 @@
"placement": {
"description": "Placement directives to consider when placing replicas of this stream, random placement when unset",
"type": "object",
"required": [
"cluster"
],
"properties": {
"cluster": {
"type": "string",
Expand Down
3 changes: 0 additions & 3 deletions schemas/jetstream/api/v1/stream_create_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@
"placement": {
"description": "Placement directives to consider when placing replicas of this stream, random placement when unset",
"type": "object",
"required": [
"cluster"
],
"properties": {
"cluster": {
"type": "string",
Expand Down
3 changes: 0 additions & 3 deletions schemas/jetstream/api/v1/stream_info_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@
"placement": {
"description": "Placement directives to consider when placing replicas of this stream, random placement when unset",
"type": "object",
"required": [
"cluster"
],
"properties": {
"cluster": {
"type": "string",
Expand Down
3 changes: 0 additions & 3 deletions schemas/jetstream/api/v1/stream_list_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,6 @@
"placement": {
"description": "Placement directives to consider when placing replicas of this stream, random placement when unset",
"type": "object",
"required": [
"cluster"
],
"properties": {
"cluster": {
"type": "string",
Expand Down
3 changes: 0 additions & 3 deletions schemas/jetstream/api/v1/stream_restore_request.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,6 @@
"placement": {
"description": "Placement directives to consider when placing replicas of this stream, random placement when unset",
"type": "object",
"required": [
"cluster"
],
"properties": {
"cluster": {
"type": "string",
Expand Down
3 changes: 0 additions & 3 deletions schemas/jetstream/api/v1/stream_snapshot_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,6 @@
"placement": {
"description": "Placement directives to consider when placing replicas of this stream, random placement when unset",
"type": "object",
"required": [
"cluster"
],
"properties": {
"cluster": {
"type": "string",
Expand Down
3 changes: 0 additions & 3 deletions schemas/jetstream/api/v1/stream_template_configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,6 @@
"placement": {
"description": "Placement directives to consider when placing replicas of this stream, random placement when unset",
"type": "object",
"required": [
"cluster"
],
"properties": {
"cluster": {
"type": "string",
Expand Down
3 changes: 0 additions & 3 deletions schemas/jetstream/api/v1/stream_template_create_request.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,6 @@
"placement": {
"description": "Placement directives to consider when placing replicas of this stream, random placement when unset",
"type": "object",
"required": [
"cluster"
],
"properties": {
"cluster": {
"type": "string",
Expand Down
3 changes: 0 additions & 3 deletions schemas/jetstream/api/v1/stream_template_create_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,6 @@
"placement": {
"description": "Placement directives to consider when placing replicas of this stream, random placement when unset",
"type": "object",
"required": [
"cluster"
],
"properties": {
"cluster": {
"type": "string",
Expand Down
3 changes: 0 additions & 3 deletions schemas/jetstream/api/v1/stream_template_info_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,6 @@
"placement": {
"description": "Placement directives to consider when placing replicas of this stream, random placement when unset",
"type": "object",
"required": [
"cluster"
],
"properties": {
"cluster": {
"type": "string",
Expand Down
3 changes: 0 additions & 3 deletions schemas/jetstream/api/v1/stream_update_request.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,6 @@
"placement": {
"description": "Placement directives to consider when placing replicas of this stream, random placement when unset",
"type": "object",
"required": [
"cluster"
],
"properties": {
"cluster": {
"type": "string",
Expand Down
3 changes: 0 additions & 3 deletions schemas/jetstream/api/v1/stream_update_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@
"placement": {
"description": "Placement directives to consider when placing replicas of this stream, random placement when unset",
"type": "object",
"required": [
"cluster"
],
"properties": {
"cluster": {
"type": "string",
Expand Down

0 comments on commit 0c5579f

Please sign in to comment.