@kumori/kdsl 0.0.12 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ package io
2
+
3
+ library
4
+
5
+ func Open(path string, args? struct open[]) string
@@ -0,0 +1,27 @@
1
+ package builtin
2
+
3
+ import "kumori"
4
+
5
+ builtin HTTPInbound {
6
+ id {
7
+ name "inbound"
8
+ kind "service"
9
+ domain "kumori.systems"
10
+ module "builtins/inbound"
11
+ version "1.3.0"
12
+ }
13
+
14
+ srv {
15
+ client { inbound "http" }
16
+ }
17
+
18
+ config {
19
+ type "https"
20
+ }
21
+
22
+ resource {
23
+ servercert: kumori.Certificate
24
+ serverdomain: kumori.Domain
25
+ clientcertca?: kumori.CA
26
+ }
27
+ }
@@ -0,0 +1,25 @@
1
+ package builtin
2
+
3
+ import "kumori"
4
+
5
+ builtin TCPInbound {
6
+ id {
7
+ name "inbound"
8
+ kind "service"
9
+ domain "kumori.systems"
10
+ module "builtins/inbound"
11
+ version "1.3.0"
12
+ }
13
+
14
+ srv {
15
+ client { inbound "tcp" }
16
+ }
17
+
18
+ config {
19
+ type "tcp"
20
+ }
21
+
22
+ resource {
23
+ port: kumori.Port
24
+ }
25
+ }
@@ -0,0 +1,18 @@
1
+ package kumori
2
+
3
+ library
4
+
5
+ alias builtin struct {
6
+ id Ref
7
+ srv Links
8
+ config struct open[]
9
+ resource struct open[Resource]
10
+ }
11
+
12
+ alias Ref struct {
13
+ name string
14
+ kind "service" | "component"
15
+ domain string
16
+ module string
17
+ version string
18
+ }
@@ -0,0 +1,120 @@
1
+ package kumori
2
+
3
+ library
4
+
5
+ alias ComponentInterface struct {
6
+ srv? Links
7
+ config? struct open[]
8
+ resource? struct open[Resource]
9
+ }
10
+
11
+ alias component struct {
12
+ srv? Links
13
+ config? struct open[]
14
+ resource? struct open[Resource]
15
+
16
+ code? struct open[Code]
17
+ init? []struct {
18
+ cmd? []string
19
+ image Image
20
+ entrypoint? []string
21
+
22
+ size struct {
23
+ memory RAMSized
24
+ cpu CPUSized
25
+ mincpu? CPUSized
26
+ }
27
+
28
+ env? struct open[Env]
29
+ fs? struct open[File]
30
+ }
31
+ size struct {
32
+ bandwidth BandwidthSized
33
+ minbandwidth? BandwidthSized
34
+ mincpu CPUSized
35
+ }
36
+ probe? struct open[Probes]
37
+ }
38
+
39
+ alias Code struct {
40
+ cmd? []string
41
+ image Image
42
+ entrypoint? []string
43
+
44
+ size struct {
45
+ memory RAMSized
46
+ cpu CPUSized
47
+ mincpu? CPUSized
48
+ }
49
+
50
+ env? struct open[Env]
51
+ fs? struct open[File]
52
+ }
53
+
54
+ alias Image string | struct { hub: struct { name: string, secret?: string }, tag: string }
55
+
56
+ alias File string | FSMap | struct { volume: string }
57
+ alias FSMap FSData | FSSecret | FSPort | FSDomain | FSCertificate | FSCa
58
+
59
+ alias AllowedFormat "text" | "json" | "yaml" | "flatdict"
60
+
61
+ alias FSData struct { data: string, mode?: number, format?: AllowedFormat }
62
+ alias FSSecret struct { secret: string, mode?: number, format?: AllowedFormat }
63
+ alias FSPort struct { port: string, mode?: number, format?: AllowedFormat }
64
+ alias FSDomain struct { domain: string, mode?: number, format?: AllowedFormat }
65
+ alias FSCertificate struct { certificate: string, mode?: number, format?: AllowedFormat }
66
+ alias FSCa struct { ca: string, mode?: number, format?: AllowedFormat }
67
+
68
+ alias Env string | bool | number | struct { secret: string }
69
+
70
+ alias Probes struct {
71
+ liveness? LivenessProbeAttributes
72
+ readiness? ReadinessProbeAttributes
73
+ pmetrics? PrometheusMetricsProbeAttributes
74
+ }
75
+
76
+ alias LivenessProbeAttributes struct {
77
+ protocol ProbeProtocol
78
+ startupGraceWindow? StartupGraceWindow
79
+ frequency? any
80
+ timeout? number
81
+ }
82
+
83
+ alias ReadinessProbeAttributes struct {
84
+ protocol ProbeProtocol
85
+ frequency? any
86
+ timeout? number
87
+ }
88
+
89
+ alias PrometheusMetricsProbeAttributes struct {
90
+ protocol HTTPOnlyProbeProtocol
91
+ }
92
+
93
+ alias ProbeProtocol struct {
94
+ http? HTTPProbeProtocol
95
+ tcp? TCPProbeProtocol
96
+ exec? ExecProbeProtocol
97
+ }
98
+
99
+ alias HTTPOnlyProbeProtocol struct {
100
+ http HTTPProbeProtocol
101
+ }
102
+
103
+ alias HTTPProbeProtocol struct {
104
+ port number
105
+ path string
106
+ }
107
+
108
+ alias TCPProbeProtocol struct {
109
+ port number
110
+ }
111
+
112
+ alias ExecProbeProtocol struct {
113
+ path string
114
+ }
115
+
116
+ alias StartupGraceWindow struct {
117
+ unit "ms" | "attempt"
118
+ duration number
119
+ probe bool
120
+ }
@@ -0,0 +1,16 @@
1
+ package kumori
2
+
3
+ library
4
+
5
+ alias deployment struct {
6
+ name string
7
+ artifact any
8
+ resilience? number
9
+
10
+ scale? ScaleSpec
11
+ config? struct open[]
12
+ resource? struct open[Resource]
13
+ meta? struct open[]
14
+ }
15
+
16
+ alias ScaleSpec struct open[] | number
@@ -0,0 +1,25 @@
1
+ package kumori
2
+
3
+ library
4
+
5
+ alias Resource Volume | CA | Certificate | Secret | Domain | Port
6
+
7
+ type CA string
8
+ type Certificate string
9
+ type Secret string
10
+ type Domain string
11
+ type Port string
12
+
13
+ alias Volume Registered | InlineVolume | DeprecatedVolume
14
+ alias InlineVolume NonReplicated | Persisted | Volatile
15
+
16
+ type Registered string
17
+ type NonReplicated StorageSized
18
+ type Persisted StorageSized
19
+ type Volatile StorageSized
20
+
21
+ // NOTE: These are here to retain backwards compatibility.
22
+ // **Do not use.** Will be removed in the future.
23
+ alias DeprecatedVolume Ephemeral | Persistent
24
+ type Ephemeral StorageSized
25
+ type Persistent string
@@ -0,0 +1,49 @@
1
+ package kumori
2
+
3
+ library
4
+
5
+ alias ServiceInterface struct {
6
+ srv? Links
7
+ config? struct open[]
8
+ resource? struct open[Resource]
9
+ }
10
+
11
+ alias service struct {
12
+ srv? Links
13
+ config? struct open[]
14
+ resource? struct open[Resource]
15
+
16
+ role? struct open[Role]
17
+ connect? struct open[Connection]
18
+ }
19
+
20
+ alias Role struct {
21
+ artifact any // TODO: service, component or builtin
22
+ config? struct open[]
23
+ resource? struct open[Resource]
24
+ meta? struct open[]
25
+ }
26
+
27
+ alias Connection LoadBalancer | FullConnector
28
+
29
+ type LoadBalancer struct {
30
+ from struct { target string, channel string } | []struct { target string, channel string }
31
+ to struct { target string, channel string } | []struct { target string, channel string }
32
+
33
+ meta? any
34
+ }
35
+
36
+ type FullConnector ReducedFullConnector | CompleteFullConnector
37
+
38
+ alias ReducedFullConnector struct {
39
+ target string
40
+ channel string
41
+ meta? any
42
+ }
43
+
44
+ alias CompleteFullConnector struct {
45
+ from struct { target string, channel string } | []struct { target string, channel string }
46
+ to struct { target string, channel string } | []struct { target string, channel string }
47
+
48
+ meta? any
49
+ }
@@ -0,0 +1,11 @@
1
+ library
2
+
3
+ alias Links struct {
4
+ client? struct open[Client]
5
+ server? struct open[Server]
6
+ duplex? struct open[Server]
7
+ }
8
+
9
+ alias Channel "udp" | "tcp" | "http" | "grpc"
10
+ alias Client Channel
11
+ alias Server Channel | struct { protocol Channel, port number }
@@ -0,0 +1,25 @@
1
+ library
2
+
3
+ alias StorageUnit "k" | "M" | "G" | "T" | "P" | "E" | "Ki" | "Mi" | "Gi" | "Ti" | "Pi" | "Ei"
4
+ alias StorageSized struct {
5
+ size number
6
+ unit StorageUnit
7
+ }
8
+
9
+ alias CPUUnit "m"
10
+ alias CPUSized struct {
11
+ size number
12
+ unit CPUUnit
13
+ }
14
+
15
+ alias RAMUnit "G" | "M" | "Gi" | "Mi"
16
+ alias RAMSized struct {
17
+ size number
18
+ unit RAMUnit
19
+ }
20
+
21
+ alias BandwidthUnit "G" | "M" | "Gi" | "Mi"
22
+ alias BandwidthSized struct {
23
+ size number
24
+ unit BandwidthUnit
25
+ }
@@ -0,0 +1,8 @@
1
+ library
2
+
3
+ alias Unit "m" | "k" | "M" | "G" | "T" | "P" | "E" | "Ki" | "Mi" | "Gi" | "Ti" | "Pi" | "Ei"
4
+
5
+ alias Sized struct {
6
+ size number
7
+ unit Unit
8
+ }
@@ -0,0 +1,8 @@
1
+ library
2
+
3
+ type bool bool
4
+ type number number
5
+ type string string
6
+ type any any
7
+ alias list []string | []number
8
+ alias struct struct open[]
@@ -0,0 +1,11 @@
1
+ package strconv
2
+
3
+ library
4
+
5
+ func Format(i number, base number) string
6
+
7
+ func JSON(v any) string
8
+
9
+ func Concat(v []string) string
10
+
11
+ func Join(v []string, sep string) string