...
This commit is contained in:
2
.github/workflows/hero_build_macos.yml
vendored
2
.github/workflows/hero_build_macos.yml
vendored
@@ -59,7 +59,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Hero
|
- name: Build Hero
|
||||||
run: |
|
run: |
|
||||||
v -w -cg -gc none -no-retry-compilation -d use_openssl -enable-globals cli/hero.v
|
v -w -cg -gc none -d use_openssl -enable-globals cli/hero.v
|
||||||
|
|
||||||
- name: Do all the basic tests
|
- name: Do all the basic tests
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -70,7 +70,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Hero
|
- name: Build Hero
|
||||||
run: |
|
run: |
|
||||||
v -w -cg -gc none -no-retry-compilation -d use_openssl -enable-globals cli/hero.v -o cli/hero-${{ matrix.target }}
|
v -w -cg -gc none -d use_openssl -enable-globals cli/hero.v -o cli/hero-${{ matrix.target }}
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
when I generate vlang scripts I will always use .vsh extension and use following as first line:
|
when I generate vlang scripts I will always use .vsh extension and use following as first line:
|
||||||
|
|
||||||
```
|
```
|
||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
```
|
```
|
||||||
|
|
||||||
- a .vsh is a v shell script and can be executed as is, no need to use v ...
|
- a .vsh is a v shell script and can be executed as is, no need to use v ...
|
||||||
@@ -21,7 +21,7 @@ when I generate vlang scripts I will always use .vsh extension and use following
|
|||||||
## to do argument parsing use following examples
|
## to do argument parsing use following examples
|
||||||
|
|
||||||
```v
|
```v
|
||||||
#!/usr/bin/env -S v -n -w -cg -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -cg -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import flag
|
import flag
|
||||||
|
|||||||
@@ -2238,7 +2238,7 @@ be faster, since there is no need for a re-compilation of a script, that has not
|
|||||||
An example `deploy.vsh`:
|
An example `deploy.vsh`:
|
||||||
|
|
||||||
```v oksyntax
|
```v oksyntax
|
||||||
#!/usr/bin/env -S v -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
// Note: The shebang line above, associates the .vsh file to V on Unix-like systems,
|
// Note: The shebang line above, associates the .vsh file to V on Unix-like systems,
|
||||||
// so it can be run just by specifying the path to the .vsh file, once it's made
|
// so it can be run just by specifying the path to the .vsh file, once it's made
|
||||||
@@ -2300,11 +2300,11 @@ Whilst V does normally not allow vsh scripts without the designated file extensi
|
|||||||
to circumvent this rule and have a file with a fully custom name and shebang. Whilst this feature
|
to circumvent this rule and have a file with a fully custom name and shebang. Whilst this feature
|
||||||
exists it is only recommended for specific usecases like scripts that will be put in the path and
|
exists it is only recommended for specific usecases like scripts that will be put in the path and
|
||||||
should **not** be used for things like build or deploy scripts. To access this feature start the
|
should **not** be used for things like build or deploy scripts. To access this feature start the
|
||||||
file with `#!/usr/bin/env -S v -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
file with `#!/usr/bin/env -S v -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
the built executable. This will run in crun mode so it will only rebuild if changes to the script
|
the built executable. This will run in crun mode so it will only rebuild if changes to the script
|
||||||
were made and keep the binary as `tmp.<scriptfilename>`. **Caution**: if this filename already
|
were made and keep the binary as `tmp.<scriptfilename>`. **Caution**: if this filename already
|
||||||
exists the file will be overridden. If you want to rebuild each time and not keep this binary
|
exists the file will be overridden. If you want to rebuild each time and not keep this binary
|
||||||
instead use `#!/usr/bin/env -S v -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
instead use `#!/usr/bin/env -S v -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
# Appendices
|
# Appendices
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
this is how we want example scripts to be, see the first line
|
this is how we want example scripts to be, see the first line
|
||||||
|
|
||||||
```vlang
|
```vlang
|
||||||
#!/usr/bin/env -S v -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.installers.sysadmintools.daguserver
|
import freeflowuniverse.herolib.installers.sysadmintools.daguserver
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env -S v -n -w -parallel-cc -enable-globals run
|
#!/usr/bin/env -S v -n -w -parallel-cc -enable-globals run
|
||||||
// #!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
// #!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import flag
|
import flag
|
||||||
@@ -45,7 +45,7 @@ compile_cmd := if os.user_os() == 'macos' {
|
|||||||
if prod_mode {
|
if prod_mode {
|
||||||
'v -enable-globals -w -n -prod hero.v'
|
'v -enable-globals -w -n -prod hero.v'
|
||||||
} else {
|
} else {
|
||||||
'v -w -cg -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals hero.v'
|
'v -w -cg -gc none -cc tcc -d use_openssl -enable-globals hero.v'
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if prod_mode {
|
if prod_mode {
|
||||||
|
|||||||
2
doc.vsh
2
doc.vsh
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import flag
|
import flag
|
||||||
@@ -64,7 +64,7 @@ os.symlink('${abs_dir_of_script}/lib', '${os.home_dir()}/.vmodules/freeflowunive
|
|||||||
println('Herolib installation completed successfully!')
|
println('Herolib installation completed successfully!')
|
||||||
|
|
||||||
// Add vtest alias
|
// Add vtest alias
|
||||||
addtoscript('alias vtest=', 'alias vtest=\'v -stats -enable-globals -n -w -cg -gc none -no-retry-compilation -cc tcc test\' ') or {
|
addtoscript('alias vtest=', 'alias vtest=\'v -stats -enable-globals -n -w -cg -gc none -cc tcc test\' ') or {
|
||||||
eprintln('Failed to add vtest alias: ${err}')
|
eprintln('Failed to add vtest alias: ${err}')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ The examples directory demonstrates various capabilities of HeroLib:
|
|||||||
When creating V scripts (.vsh files), always use the following shebang:
|
When creating V scripts (.vsh files), always use the following shebang:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
```
|
```
|
||||||
|
|
||||||
This shebang ensures:
|
This shebang ensures:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.builder
|
import freeflowuniverse.herolib.builder
|
||||||
import freeflowuniverse.herolib.core.pathlib
|
import freeflowuniverse.herolib.core.pathlib
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.builder
|
import freeflowuniverse.herolib.builder
|
||||||
import freeflowuniverse.herolib.core.pathlib
|
import freeflowuniverse.herolib.core.pathlib
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.builder
|
import freeflowuniverse.herolib.builder
|
||||||
import freeflowuniverse.herolib.core.pathlib
|
import freeflowuniverse.herolib.core.pathlib
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.core.base
|
import freeflowuniverse.herolib.core.base
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.core.pathlib
|
import freeflowuniverse.herolib.core.pathlib
|
||||||
import freeflowuniverse.herolib.core.base
|
import freeflowuniverse.herolib.core.base
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.core.base
|
import freeflowuniverse.herolib.core.base
|
||||||
import freeflowuniverse.herolib.develop.gittools
|
import freeflowuniverse.herolib.develop.gittools
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import freeflowuniverse.herolib.core.codeparser
|
import freeflowuniverse.herolib.core.codeparser
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import freeflowuniverse.herolib.core.smartid
|
import freeflowuniverse.herolib.core.smartid
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.data.dbfs
|
import freeflowuniverse.herolib.data.dbfs
|
||||||
import time
|
import time
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.core.generator.installer
|
import freeflowuniverse.herolib.core.generator.installer
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.core.pathlib
|
import freeflowuniverse.herolib.core.pathlib
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.core.pathlib
|
import freeflowuniverse.herolib.core.pathlib
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.core.pathlib
|
import freeflowuniverse.herolib.core.pathlib
|
||||||
import freeflowuniverse.herolib.data.paramsparser
|
import freeflowuniverse.herolib.data.paramsparser
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.core.pathlib
|
import freeflowuniverse.herolib.core.pathlib
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.crypt.secrets
|
import freeflowuniverse.herolib.crypt.secrets
|
||||||
|
|
||||||
|
|||||||
BIN
examples/data/cache
Executable file
BIN
examples/data/cache
Executable file
Binary file not shown.
139
examples/data/cache.vsh
Executable file
139
examples/data/cache.vsh
Executable file
@@ -0,0 +1,139 @@
|
|||||||
|
#!/usr/bin/env -S v run
|
||||||
|
|
||||||
|
// Example struct to cache
|
||||||
|
import freeflowuniverse.herolib.data.cache
|
||||||
|
import time
|
||||||
|
|
||||||
|
@[heap]
|
||||||
|
struct User {
|
||||||
|
id u32
|
||||||
|
name string
|
||||||
|
age int
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
// Create a cache with custom configuration
|
||||||
|
config := cache.CacheConfig{
|
||||||
|
max_entries: 1000 // Maximum number of entries
|
||||||
|
max_size_mb: 10.0 // Maximum cache size in MB
|
||||||
|
ttl_seconds: 300 // Items expire after 5 minutes
|
||||||
|
eviction_ratio: 0.2 // Evict 20% of entries when full
|
||||||
|
}
|
||||||
|
|
||||||
|
mut user_cache := cache.new_cache[User](config)
|
||||||
|
|
||||||
|
// Create some example users
|
||||||
|
user1 := &User{
|
||||||
|
id: 1
|
||||||
|
name: 'Alice'
|
||||||
|
age: 30
|
||||||
|
}
|
||||||
|
|
||||||
|
user2 := &User{
|
||||||
|
id: 2
|
||||||
|
name: 'Bob'
|
||||||
|
age: 25
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add users to cache
|
||||||
|
println('Adding users to cache...')
|
||||||
|
user_cache.set(user1.id, user1)
|
||||||
|
user_cache.set(user2.id, user2)
|
||||||
|
|
||||||
|
// Retrieve users from cache
|
||||||
|
println('\nRetrieving users from cache:')
|
||||||
|
if cached_user1 := user_cache.get(1) {
|
||||||
|
println('Found user 1: ${cached_user1.name}, age ${cached_user1.age}')
|
||||||
|
}
|
||||||
|
|
||||||
|
if cached_user2 := user_cache.get(2) {
|
||||||
|
println('Found user 2: ${cached_user2.name}, age ${cached_user2.age}')
|
||||||
|
}
|
||||||
|
|
||||||
|
// Try to get non-existent user
|
||||||
|
println('\nTrying to get non-existent user:')
|
||||||
|
if user := user_cache.get(999) {
|
||||||
|
println('Found user: ${user.name}')
|
||||||
|
} else {
|
||||||
|
println('User not found in cache')
|
||||||
|
}
|
||||||
|
|
||||||
|
// Demonstrate cache stats
|
||||||
|
println('\nCache statistics:')
|
||||||
|
println('Number of entries: ${user_cache.len()}')
|
||||||
|
|
||||||
|
// Clear the cache
|
||||||
|
println('\nClearing cache...')
|
||||||
|
user_cache.clear()
|
||||||
|
println('Cache entries after clear: ${user_cache.len()}')
|
||||||
|
|
||||||
|
// Demonstrate max entries limit
|
||||||
|
println('\nDemonstrating max entries limit (adding 2000 entries):')
|
||||||
|
println('Initial cache size: ${user_cache.len()}')
|
||||||
|
|
||||||
|
for i := u32(0); i < 2000; i++ {
|
||||||
|
user := &User{
|
||||||
|
id: i
|
||||||
|
name: 'User${i}'
|
||||||
|
age: 20 + int(i % 50)
|
||||||
|
}
|
||||||
|
user_cache.set(i, user)
|
||||||
|
|
||||||
|
if i % 200 == 0 {
|
||||||
|
println('After adding ${i} entries:')
|
||||||
|
println(' Cache size: ${user_cache.len()}')
|
||||||
|
|
||||||
|
// Check some entries to verify LRU behavior
|
||||||
|
if i >= 500 {
|
||||||
|
old_id := if i < 1000 { u32(0) } else { i - 1000 }
|
||||||
|
recent_id := i - 1
|
||||||
|
println(' Entry ${old_id} (old): ${if _ := user_cache.get(old_id) {
|
||||||
|
'found'
|
||||||
|
} else {
|
||||||
|
'evicted'
|
||||||
|
}}')
|
||||||
|
println(' Entry ${recent_id} (recent): ${if _ := user_cache.get(recent_id) {
|
||||||
|
'found'
|
||||||
|
} else {
|
||||||
|
'evicted'
|
||||||
|
}}')
|
||||||
|
}
|
||||||
|
println('')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
println('Final statistics:')
|
||||||
|
println('Cache size: ${user_cache.len()} (should be max 1000)')
|
||||||
|
|
||||||
|
// Verify we can only access recent entries
|
||||||
|
println('\nVerifying LRU behavior:')
|
||||||
|
println('First entry (0): ${if _ := user_cache.get(0) { 'found' } else { 'evicted' }}')
|
||||||
|
println('Middle entry (1000): ${if _ := user_cache.get(1000) { 'found' } else { 'evicted' }}')
|
||||||
|
println('Recent entry (1900): ${if _ := user_cache.get(1900) { 'found' } else { 'evicted' }}')
|
||||||
|
println('Last entry (1999): ${if _ := user_cache.get(1999) { 'found' } else { 'evicted' }}')
|
||||||
|
|
||||||
|
// Demonstrate TTL expiration
|
||||||
|
println('\nDemonstrating TTL expiration:')
|
||||||
|
quick_config := cache.CacheConfig{
|
||||||
|
ttl_seconds: 2 // Set short TTL for demo
|
||||||
|
}
|
||||||
|
mut quick_cache := cache.new_cache[User](quick_config)
|
||||||
|
|
||||||
|
// Add a user
|
||||||
|
quick_cache.set(user1.id, user1)
|
||||||
|
println('Added user to cache with 2 second TTL')
|
||||||
|
|
||||||
|
if cached := quick_cache.get(user1.id) {
|
||||||
|
println('User found immediately: ${cached.name}')
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wait for TTL to expire
|
||||||
|
println('Waiting for TTL to expire...')
|
||||||
|
time.sleep(3 * time.second)
|
||||||
|
|
||||||
|
if _ := quick_cache.get(user1.id) {
|
||||||
|
println('User still in cache')
|
||||||
|
} else {
|
||||||
|
println('User expired from cache as expected')
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.data.encoder
|
import freeflowuniverse.herolib.data.encoder
|
||||||
import crypto.ed25519
|
import crypto.ed25519
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.crypt.aes_symmetric { decrypt, encrypt }
|
import freeflowuniverse.herolib.crypt.aes_symmetric { decrypt, encrypt }
|
||||||
import freeflowuniverse.herolib.ui.console
|
import freeflowuniverse.herolib.ui.console
|
||||||
|
|||||||
@@ -1,94 +1,175 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
|
// Example demonstrating GraphDB usage in a social network context
|
||||||
import freeflowuniverse.herolib.data.graphdb
|
import freeflowuniverse.herolib.data.graphdb
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// Create a new graph database
|
// Initialize a new graph database with default cache settings
|
||||||
mut gdb := graphdb.new(path: '/tmp/graphdb_example', reset: true)!
|
mut gdb := graphdb.new(
|
||||||
|
path: '/tmp/social_network_example'
|
||||||
|
reset: true // Start fresh each time
|
||||||
|
)!
|
||||||
|
|
||||||
// Create some nodes
|
println('=== Social Network Graph Example ===\n')
|
||||||
println('\nCreating nodes...')
|
|
||||||
|
// 1. Creating User Nodes
|
||||||
|
println('Creating users...')
|
||||||
mut alice_id := gdb.create_node({
|
mut alice_id := gdb.create_node({
|
||||||
'name': 'Alice',
|
'type': 'user'
|
||||||
'age': '30',
|
'name': 'Alice Chen'
|
||||||
'city': 'New York'
|
'age': '28'
|
||||||
|
'location': 'San Francisco'
|
||||||
|
'occupation': 'Software Engineer'
|
||||||
})!
|
})!
|
||||||
println(gdb.debug_node(alice_id)!)
|
println('Created user: ${gdb.debug_node(alice_id)!}')
|
||||||
|
|
||||||
mut bob_id := gdb.create_node({
|
mut bob_id := gdb.create_node({
|
||||||
'name': 'Bob',
|
'type': 'user'
|
||||||
'age': '25',
|
'name': 'Bob Smith'
|
||||||
'city': 'Boston'
|
'age': '32'
|
||||||
|
'location': 'New York'
|
||||||
|
'occupation': 'Product Manager'
|
||||||
})!
|
})!
|
||||||
println(gdb.debug_node(bob_id)!)
|
println('Created user: ${gdb.debug_node(bob_id)!}')
|
||||||
|
|
||||||
|
mut carol_id := gdb.create_node({
|
||||||
|
'type': 'user'
|
||||||
|
'name': 'Carol Davis'
|
||||||
|
'age': '27'
|
||||||
|
'location': 'San Francisco'
|
||||||
|
'occupation': 'Data Scientist'
|
||||||
|
})!
|
||||||
|
println('Created user: ${gdb.debug_node(carol_id)!}')
|
||||||
|
|
||||||
|
// 2. Creating Organization Nodes
|
||||||
|
println('\nCreating organizations...')
|
||||||
mut techcorp_id := gdb.create_node({
|
mut techcorp_id := gdb.create_node({
|
||||||
'name': 'TechCorp',
|
'type': 'organization'
|
||||||
'industry': 'Technology',
|
'name': 'TechCorp'
|
||||||
|
'industry': 'Technology'
|
||||||
|
'location': 'San Francisco'
|
||||||
|
'size': '500+'
|
||||||
|
})!
|
||||||
|
println('Created organization: ${gdb.debug_node(techcorp_id)!}')
|
||||||
|
|
||||||
|
mut datacorp_id := gdb.create_node({
|
||||||
|
'type': 'organization'
|
||||||
|
'name': 'DataCorp'
|
||||||
|
'industry': 'Data Analytics'
|
||||||
'location': 'New York'
|
'location': 'New York'
|
||||||
|
'size': '100-500'
|
||||||
})!
|
})!
|
||||||
println(gdb.debug_node(techcorp_id)!)
|
println('Created organization: ${gdb.debug_node(datacorp_id)!}')
|
||||||
|
|
||||||
// Create relationships
|
// 3. Creating Interest Nodes
|
||||||
|
println('\nCreating interest groups...')
|
||||||
|
mut ai_group_id := gdb.create_node({
|
||||||
|
'type': 'group'
|
||||||
|
'name': 'AI Enthusiasts'
|
||||||
|
'category': 'Technology'
|
||||||
|
'members': '0'
|
||||||
|
})!
|
||||||
|
println('Created group: ${gdb.debug_node(ai_group_id)!}')
|
||||||
|
|
||||||
|
// 4. Establishing Relationships
|
||||||
println('\nCreating relationships...')
|
println('\nCreating relationships...')
|
||||||
knows_edge_id := gdb.create_edge(alice_id, bob_id, 'KNOWS', {
|
|
||||||
'since': '2020',
|
// Friendship relationships
|
||||||
'relationship': 'Colleague'
|
gdb.create_edge(alice_id, bob_id, 'FRIENDS', {
|
||||||
|
'since': '2022'
|
||||||
|
'strength': 'close'
|
||||||
})!
|
})!
|
||||||
println(gdb.debug_edge(knows_edge_id)!)
|
gdb.create_edge(alice_id, carol_id, 'FRIENDS', {
|
||||||
|
'since': '2023'
|
||||||
works_at_id := gdb.create_edge(alice_id, techcorp_id, 'WORKS_AT', {
|
'strength': 'close'
|
||||||
'role': 'Software Engineer',
|
|
||||||
'since': '2019'
|
|
||||||
})!
|
})!
|
||||||
println(gdb.debug_edge(works_at_id)!)
|
|
||||||
|
|
||||||
// Show current database state
|
// Employment relationships
|
||||||
println('\nInitial database state:')
|
gdb.create_edge(alice_id, techcorp_id, 'WORKS_AT', {
|
||||||
gdb.debug_db()!
|
'role': 'Senior Engineer'
|
||||||
|
'since': '2021'
|
||||||
|
'department': 'Engineering'
|
||||||
|
})!
|
||||||
|
gdb.create_edge(bob_id, datacorp_id, 'WORKS_AT', {
|
||||||
|
'role': 'Product Lead'
|
||||||
|
'since': '2020'
|
||||||
|
'department': 'Product'
|
||||||
|
})!
|
||||||
|
gdb.create_edge(carol_id, techcorp_id, 'WORKS_AT', {
|
||||||
|
'role': 'Data Scientist'
|
||||||
|
'since': '2022'
|
||||||
|
'department': 'Analytics'
|
||||||
|
})!
|
||||||
|
|
||||||
// Print graph structure
|
// Group memberships
|
||||||
println('\nGraph structure:')
|
gdb.create_edge(alice_id, ai_group_id, 'MEMBER_OF', {
|
||||||
|
'joined': '2023'
|
||||||
|
'status': 'active'
|
||||||
|
})!
|
||||||
|
gdb.create_edge(carol_id, ai_group_id, 'MEMBER_OF', {
|
||||||
|
'joined': '2023'
|
||||||
|
'status': 'active'
|
||||||
|
})!
|
||||||
|
|
||||||
|
// 5. Querying the Graph
|
||||||
|
println('\nPerforming queries...')
|
||||||
|
|
||||||
|
// Find users in San Francisco
|
||||||
|
println('\nUsers in San Francisco:')
|
||||||
|
sf_users := gdb.query_nodes_by_property('location', 'San Francisco')!
|
||||||
|
for user in sf_users {
|
||||||
|
if user.properties['type'] == 'user' {
|
||||||
|
println('- ${user.properties['name']} (${user.properties['occupation']})')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find Alice's friends
|
||||||
|
println("\nAlice's friends:")
|
||||||
|
alice_friends := gdb.get_connected_nodes(alice_id, 'FRIENDS', 'out')!
|
||||||
|
for friend in alice_friends {
|
||||||
|
println('- ${friend.properties['name']} in ${friend.properties['location']}')
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find where Alice works
|
||||||
|
println("\nAlice's workplace:")
|
||||||
|
alice_workplaces := gdb.get_connected_nodes(alice_id, 'WORKS_AT', 'out')!
|
||||||
|
for workplace in alice_workplaces {
|
||||||
|
println('- ${workplace.properties['name']} (${workplace.properties['industry']})')
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find TechCorp employees
|
||||||
|
println('\nTechCorp employees:')
|
||||||
|
techcorp_employees := gdb.get_connected_nodes(techcorp_id, 'WORKS_AT', 'in')!
|
||||||
|
for employee in techcorp_employees {
|
||||||
|
println('- ${employee.properties['name']} as ${employee.properties['occupation']}')
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find AI group members
|
||||||
|
println('\nAI Enthusiasts group members:')
|
||||||
|
ai_members := gdb.get_connected_nodes(ai_group_id, 'MEMBER_OF', 'in')!
|
||||||
|
for member in ai_members {
|
||||||
|
println('- ${member.properties['name']}')
|
||||||
|
}
|
||||||
|
|
||||||
|
// 6. Updating Data
|
||||||
|
println('\nUpdating data...')
|
||||||
|
|
||||||
|
// Promote Alice
|
||||||
|
println('\nPromoting Alice...')
|
||||||
|
mut alice := gdb.get_node(alice_id)!
|
||||||
|
alice.properties['occupation'] = 'Lead Software Engineer'
|
||||||
|
gdb.update_node(alice_id, alice.properties)!
|
||||||
|
|
||||||
|
// Update Alice's work relationship
|
||||||
|
mut edges := gdb.get_edges_between(alice_id, techcorp_id)!
|
||||||
|
if edges.len > 0 {
|
||||||
|
gdb.update_edge(edges[0].id, {
|
||||||
|
'role': 'Engineering Team Lead'
|
||||||
|
'since': '2021'
|
||||||
|
'department': 'Engineering'
|
||||||
|
})!
|
||||||
|
}
|
||||||
|
|
||||||
|
println('\nFinal graph structure:')
|
||||||
gdb.print_graph()!
|
gdb.print_graph()!
|
||||||
|
|
||||||
// Query nodes by property
|
|
||||||
println('\nQuerying nodes in New York:')
|
|
||||||
ny_nodes := gdb.query_nodes_by_property('city', 'New York')!
|
|
||||||
for node in ny_nodes {
|
|
||||||
println('Found: ${node.properties['name']}')
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get connected nodes
|
|
||||||
println('\nPeople Alice knows:')
|
|
||||||
alice_knows := gdb.get_connected_nodes(alice_id, 'KNOWS', 'out')!
|
|
||||||
for node in alice_knows {
|
|
||||||
println('${node.properties['name']} (${node.properties['city']})')
|
|
||||||
}
|
|
||||||
|
|
||||||
println('\nWhere Alice works:')
|
|
||||||
alice_works := gdb.get_connected_nodes(alice_id, 'WORKS_AT', 'out')!
|
|
||||||
for node in alice_works {
|
|
||||||
println('${node.properties['name']} (${node.properties['industry']})')
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update node properties
|
|
||||||
println('\nUpdating Alice\'s age...')
|
|
||||||
gdb.update_node(alice_id, {
|
|
||||||
'name': 'Alice',
|
|
||||||
'age': '31',
|
|
||||||
'city': 'New York'
|
|
||||||
})!
|
|
||||||
println(gdb.debug_node(alice_id)!)
|
|
||||||
|
|
||||||
// Update edge properties
|
|
||||||
println('\nUpdating work relationship...')
|
|
||||||
gdb.update_edge(works_at_id, {
|
|
||||||
'role': 'Senior Software Engineer',
|
|
||||||
'since': '2019'
|
|
||||||
})!
|
|
||||||
println(gdb.debug_edge(works_at_id)!)
|
|
||||||
|
|
||||||
// Show final state
|
|
||||||
println('\nFinal database state:')
|
|
||||||
gdb.debug_db()!
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.data.encoderhero
|
import freeflowuniverse.herolib.data.encoderhero
|
||||||
import freeflowuniverse.herolib.core.base
|
import freeflowuniverse.herolib.core.base
|
||||||
|
|||||||
@@ -1,20 +1,18 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.data.ourdb
|
import freeflowuniverse.herolib.data.ourdb
|
||||||
|
|
||||||
|
|
||||||
const test_dir = '/tmp/ourdb'
|
const test_dir = '/tmp/ourdb'
|
||||||
|
|
||||||
|
|
||||||
mut db := ourdb.new(
|
mut db := ourdb.new(
|
||||||
record_nr_max: 16777216 - 1 // max size of records
|
record_nr_max: 16777216 - 1 // max size of records
|
||||||
record_size_max: 1024
|
record_size_max: 1024
|
||||||
path: test_dir
|
path: test_dir
|
||||||
reset: true
|
reset: true
|
||||||
)!
|
)!
|
||||||
|
|
||||||
defer {
|
defer {
|
||||||
db.destroy() or { panic('failed to destroy db: ${err}') }
|
db.destroy() or { panic('failed to destroy db: ${err}') }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test set and get
|
// Test set and get
|
||||||
@@ -24,12 +22,12 @@ id := db.set(data: test_data)!
|
|||||||
retrieved := db.get(id)!
|
retrieved := db.get(id)!
|
||||||
assert retrieved == test_data
|
assert retrieved == test_data
|
||||||
|
|
||||||
assert id==0
|
assert id == 0
|
||||||
|
|
||||||
// Test overwrite
|
// Test overwrite
|
||||||
new_data := 'Updated data'.bytes()
|
new_data := 'Updated data'.bytes()
|
||||||
id2 := db.set(id:0, data: new_data)!
|
id2 := db.set(id: 0, data: new_data)!
|
||||||
assert id2==0
|
assert id2 == 0
|
||||||
|
|
||||||
// // Verify lookup table has the correct location
|
// // Verify lookup table has the correct location
|
||||||
// location := db.lookup.get(id2)!
|
// location := db.lookup.get(id2)!
|
||||||
@@ -39,4 +37,4 @@ assert id2==0
|
|||||||
retrieved2 := db.get(id2)!
|
retrieved2 := db.get(id2)!
|
||||||
println('Retrieved data: ${retrieved2}')
|
println('Retrieved data: ${retrieved2}')
|
||||||
println('Expected data: ${new_data}')
|
println('Expected data: ${new_data}')
|
||||||
assert retrieved2 == new_data
|
assert retrieved2 == new_data
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.core.playbook
|
import freeflowuniverse.herolib.core.playbook
|
||||||
import freeflowuniverse.herolib.data.paramsparser
|
import freeflowuniverse.herolib.data.paramsparser
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.data.paramsparser { Params, parse }
|
import freeflowuniverse.herolib.data.paramsparser { Params, parse }
|
||||||
import time
|
import time
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.data.radixtree
|
import freeflowuniverse.herolib.data.radixtree
|
||||||
|
|
||||||
mut rt := radixtree.new(path:'/tmp/radixtree_test',reset:true)!
|
mut rt := radixtree.new(path: '/tmp/radixtree_test', reset: true)!
|
||||||
|
|
||||||
// Show initial state
|
// Show initial state
|
||||||
println('\nInitial state:')
|
println('\nInitial state:')
|
||||||
@@ -21,13 +21,11 @@ rt.print_tree()!
|
|||||||
|
|
||||||
// Test search
|
// Test search
|
||||||
if value := rt.search('test') {
|
if value := rt.search('test') {
|
||||||
println('\nFound value: ${value.bytestr()}')
|
println('\nFound value: ${value.bytestr()}')
|
||||||
} else {
|
} else {
|
||||||
println('\nError: ${err}')
|
println('\nError: ${err}')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
println('\nInserting key "test2" with value "value2"')
|
println('\nInserting key "test2" with value "value2"')
|
||||||
rt.insert('test2', 'value2'.bytes())!
|
rt.insert('test2', 'value2'.bytes())!
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.data.resp
|
import freeflowuniverse.herolib.data.resp
|
||||||
import crypto.ed25519
|
import crypto.ed25519
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -cg -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cg -cc tcc -d use_openssl -enable-globals run
|
||||||
// #!/usr/bin/env -S v -n -w -cg -no-retry-compilation -d use_openssl -enable-globals run
|
|
||||||
|
// #!/usr/bin/env -S v -n -w -cg -d use_openssl -enable-globals run
|
||||||
//-parallel-cc
|
//-parallel-cc
|
||||||
import os
|
import os
|
||||||
import freeflowuniverse.herolib.develop.gittools
|
import freeflowuniverse.herolib.develop.gittools
|
||||||
|
|
||||||
mut gs := gittools.get(reload:true)!
|
mut gs := gittools.get(reload: true)!
|
||||||
|
|
||||||
gs.repos_print()!
|
gs.repos_print()!
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.develop.gittools
|
import freeflowuniverse.herolib.develop.gittools
|
||||||
import freeflowuniverse.herolib.osal
|
import freeflowuniverse.herolib.osal
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.develop.gittools
|
import freeflowuniverse.herolib.develop.gittools
|
||||||
import freeflowuniverse.herolib.osal
|
import freeflowuniverse.herolib.osal
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import freeflowuniverse.herolib.osal
|
import freeflowuniverse.herolib.osal
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.sysadmin.startupmanager
|
import freeflowuniverse.herolib.sysadmin.startupmanager
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.develop.luadns
|
import freeflowuniverse.herolib.develop.luadns
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.clients.openai as op
|
import freeflowuniverse.herolib.clients.openai as op
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
// import freeflowuniverse.herolib.core.base
|
// import freeflowuniverse.herolib.core.base
|
||||||
import freeflowuniverse.herolib.clients.runpod
|
import freeflowuniverse.herolib.clients.runpod
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.clients.vastai
|
import freeflowuniverse.herolib.clients.vastai
|
||||||
import json
|
import json
|
||||||
@@ -24,19 +24,19 @@ create_instance_res := va.create_instance(
|
|||||||
println('create instance res: ${create_instance_res}')
|
println('create instance res: ${create_instance_res}')
|
||||||
|
|
||||||
attach_sshkey_to_instance_res := va.attach_sshkey_to_instance(
|
attach_sshkey_to_instance_res := va.attach_sshkey_to_instance(
|
||||||
id: 1
|
id: 1
|
||||||
ssh_key: "ssh-rsa AAAA..."
|
ssh_key: 'ssh-rsa AAAA...'
|
||||||
)!
|
)!
|
||||||
println('attach sshkey to instance res: ${attach_sshkey_to_instance_res}')
|
println('attach sshkey to instance res: ${attach_sshkey_to_instance_res}')
|
||||||
|
|
||||||
stop_instance_res := va.stop_instance(
|
stop_instance_res := va.stop_instance(
|
||||||
id: 1
|
id: 1
|
||||||
state: "stopped"
|
state: 'stopped'
|
||||||
)!
|
)!
|
||||||
println('stop instance res: ${stop_instance_res}')
|
println('stop instance res: ${stop_instance_res}')
|
||||||
|
|
||||||
destroy_instance_res := va.destroy_instance(
|
destroy_instance_res := va.destroy_instance(
|
||||||
id: 1
|
id: 1
|
||||||
)!
|
)!
|
||||||
println('destroy instance res: ${destroy_instance_res}')
|
println('destroy instance res: ${destroy_instance_res}')
|
||||||
|
|
||||||
@@ -44,23 +44,23 @@ println('destroy instance res: ${destroy_instance_res}')
|
|||||||
// (request failed with code 500: {"error":"server_error","msg":"Something went wrong on the server"})
|
// (request failed with code 500: {"error":"server_error","msg":"Something went wrong on the server"})
|
||||||
launch_instance_res := va.launch_instance(
|
launch_instance_res := va.launch_instance(
|
||||||
// Required
|
// Required
|
||||||
num_gpus: 1,
|
num_gpus: 1
|
||||||
gpu_name: "RTX_3090",
|
gpu_name: 'RTX_3090'
|
||||||
image: 'vastai/tensorflow',
|
image: 'vastai/tensorflow'
|
||||||
disk: 10,
|
disk: 10
|
||||||
region: "us-west",
|
region: 'us-west'
|
||||||
|
|
||||||
// Optional
|
// Optional
|
||||||
env: "user=7amada, home=/home/7amada",
|
env: 'user=7amada, home=/home/7amada'
|
||||||
)!
|
)!
|
||||||
println('destroy instance res: ${launch_instance_res}')
|
println('destroy instance res: ${launch_instance_res}')
|
||||||
|
|
||||||
start_instances_res := va.start_instances(
|
start_instances_res := va.start_instances(
|
||||||
ids: [1, 2, 3]
|
ids: [1, 2, 3]
|
||||||
)!
|
)!
|
||||||
println('start instances res: ${start_instances_res}')
|
println('start instances res: ${start_instances_res}')
|
||||||
|
|
||||||
start_instance_res := va.start_instance(
|
start_instance_res := va.start_instance(
|
||||||
id: 1
|
id: 1
|
||||||
)!
|
)!
|
||||||
println('start instance res: ${start_instance_res}')
|
println('start instance res: ${start_instance_res}')
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.hero.bootstrap
|
import freeflowuniverse.herolib.hero.bootstrap
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.hero.generation
|
import freeflowuniverse.herolib.hero.generation
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.hero.generation
|
import freeflowuniverse.herolib.hero.generation
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import example_actor
|
import example_actor
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.installers.sysadmintools.actrunner
|
import freeflowuniverse.herolib.installers.sysadmintools.actrunner
|
||||||
import freeflowuniverse.herolib.installers.virt.herocontainers
|
import freeflowuniverse.herolib.installers.virt.herocontainers
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.installers.fediverse.conduit
|
import freeflowuniverse.herolib.installers.fediverse.conduit
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.installers.infra.coredns as coredns_installer
|
import freeflowuniverse.herolib.installers.infra.coredns as coredns_installer
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.installers.sysadmintools.daguserver
|
import freeflowuniverse.herolib.installers.sysadmintools.daguserver
|
||||||
import freeflowuniverse.herolib.installers.infra.zinit
|
import freeflowuniverse.herolib.installers.infra.zinit
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.installers.sysadmintools.daguserver
|
import freeflowuniverse.herolib.installers.sysadmintools.daguserver
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.installers.infra.gitea as gitea_installer
|
import freeflowuniverse.herolib.installers.infra.gitea as gitea_installer
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.installers.threefold.griddriver
|
import freeflowuniverse.herolib.installers.threefold.griddriver
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.installers.lang.vlang
|
import freeflowuniverse.herolib.installers.lang.vlang
|
||||||
import freeflowuniverse.herolib.installers.sysadmintools.daguserver
|
import freeflowuniverse.herolib.installers.sysadmintools.daguserver
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.osal
|
import freeflowuniverse.herolib.osal
|
||||||
import freeflowuniverse.herolib.installers.lang.golang
|
import freeflowuniverse.herolib.installers.lang.golang
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -cg -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -cg -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.installers.lang.rust
|
import freeflowuniverse.herolib.installers.lang.rust
|
||||||
import freeflowuniverse.herolib.installers.lang.python
|
import freeflowuniverse.herolib.installers.lang.python
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.installers.net.mycelium as mycelium_installer
|
import freeflowuniverse.herolib.installers.net.mycelium as mycelium_installer
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.installers.virt.podman as podman_installer
|
import freeflowuniverse.herolib.installers.virt.podman as podman_installer
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import freeflowuniverse.herolib.installers.db.postgresql
|
import freeflowuniverse.herolib.installers.db.postgresql
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.installers.virt.youki
|
import freeflowuniverse.herolib.installers.virt.youki
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.lang.python
|
import freeflowuniverse.herolib.lang.python
|
||||||
import json
|
import json
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.osal { download }
|
import freeflowuniverse.herolib.osal { download }
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.osal { ping }
|
import freeflowuniverse.herolib.osal { ping }
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.builder
|
import freeflowuniverse.herolib.builder
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.installers.infra.zinit as zinitinstaller
|
import freeflowuniverse.herolib.installers.infra.zinit as zinitinstaller
|
||||||
import freeflowuniverse.herolib.sysadmin.startupmanager
|
import freeflowuniverse.herolib.sysadmin.startupmanager
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.osal.systemd
|
import freeflowuniverse.herolib.osal.systemd
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.osal.ufw
|
import freeflowuniverse.herolib.osal.ufw
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.osal.ufw
|
import freeflowuniverse.herolib.osal.ufw
|
||||||
import freeflowuniverse.herolib.core.playbook
|
import freeflowuniverse.herolib.core.playbook
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ To be able to run examples you need to install updated version of `griddriver`.
|
|||||||
Create some `griddriver_install.vsh` file containing following code:
|
Create some `griddriver_install.vsh` file containing following code:
|
||||||
|
|
||||||
```vlang
|
```vlang
|
||||||
#!/usr/bin/env -S v -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.installers.tfgrid.griddriver as griddriverinstaller
|
import freeflowuniverse.herolib.installers.tfgrid.griddriver as griddriverinstaller
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.grid.models
|
import freeflowuniverse.herolib.threefold.grid.models
|
||||||
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
||||||
import freeflowuniverse.herolib.threefold.grid.models
|
import freeflowuniverse.herolib.threefold.grid.models
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
||||||
import freeflowuniverse.herolib.threefold.grid.models
|
import freeflowuniverse.herolib.threefold.grid.models
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.grid.models
|
import freeflowuniverse.herolib.threefold.grid.models
|
||||||
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.grid.models
|
import freeflowuniverse.herolib.threefold.grid.models
|
||||||
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.grid.models
|
import freeflowuniverse.herolib.threefold.grid.models
|
||||||
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.grid.models
|
import freeflowuniverse.herolib.threefold.grid.models
|
||||||
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.grid.models
|
import freeflowuniverse.herolib.threefold.grid.models
|
||||||
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
struct DeploymentStateDB {
|
struct DeploymentStateDB {
|
||||||
secret string // to encrypt symmetric
|
secret string // to encrypt symmetric
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import log
|
import log
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
||||||
import log
|
import log
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
||||||
import freeflowuniverse.herolib.threefold.griddriver
|
import freeflowuniverse.herolib.threefold.griddriver
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
struct VMSpecs {
|
struct VMSpecs {
|
||||||
deployment_name string
|
deployment_name string
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
struct NodeQuery {
|
struct NodeQuery {
|
||||||
location string // how to define location
|
location string // how to define location
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
struct WebGWArgs {
|
struct WebGWArgs {
|
||||||
deployment_name string
|
deployment_name string
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.core.redisclient { RedisClient }
|
import freeflowuniverse.herolib.core.redisclient { RedisClient }
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.gridproxy
|
import freeflowuniverse.herolib.threefold.gridproxy
|
||||||
import freeflowuniverse.herolib.ui.console
|
import freeflowuniverse.herolib.ui.console
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
import freeflowuniverse.herolib.threefold.grid as tfgrid
|
||||||
import freeflowuniverse.herolib.threefold.gridproxy
|
import freeflowuniverse.herolib.threefold.gridproxy
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.gridproxy
|
import freeflowuniverse.herolib.threefold.gridproxy
|
||||||
import freeflowuniverse.herolib.ui.console
|
import freeflowuniverse.herolib.ui.console
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.gridproxy
|
import freeflowuniverse.herolib.threefold.gridproxy
|
||||||
import freeflowuniverse.herolib.ui.console
|
import freeflowuniverse.herolib.ui.console
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.gridproxy
|
import freeflowuniverse.herolib.threefold.gridproxy
|
||||||
import freeflowuniverse.herolib.ui.console
|
import freeflowuniverse.herolib.ui.console
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.gridproxy
|
import freeflowuniverse.herolib.threefold.gridproxy
|
||||||
import freeflowuniverse.herolib.ui.console
|
import freeflowuniverse.herolib.ui.console
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.threefold.gridproxy
|
import freeflowuniverse.herolib.threefold.gridproxy
|
||||||
import freeflowuniverse.herolib.threefold.gridproxy.model { NodeStatus }
|
import freeflowuniverse.herolib.threefold.gridproxy.model { NodeStatus }
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user