Skip to content

Commit

Permalink
feat: file sync (#1416)
Browse files Browse the repository at this point in the history
* feat: syncthing installation

Signed-off-by: AlexXi19 <[email protected]>

* feat: execute syncthing binary and testing

Signed-off-by: AlexXi19 <[email protected]>

* feat: syncthing config

Signed-off-by: AlexXi19 <[email protected]>

* chore: mod tidy

Signed-off-by: AlexXi19 <[email protected]>

* feat: local syncthing config initialization

Signed-off-by: AlexXi19 <[email protected]>

* feat: await apply config

Signed-off-by: AlexXi19 <[email protected]>

* feat: add packages

Signed-off-by: AlexXi19 <[email protected]>

* fix: remove duplicate code

Signed-off-by: AlexXi19 <[email protected]>

* feat: add device connection

Signed-off-by: AlexXi19 <[email protected]>

* feat: successfully connect two devices

Signed-off-by: AlexXi19 <[email protected]>

* feat: syncthing file sync

Signed-off-by: AlexXi19 <[email protected]>

* feat: folder sync and ssh port forward

Signed-off-by: AlexXi19 <[email protected]>

* chore: clean up

Signed-off-by: AlexXi19 <[email protected]>

* chore: lint and more cleanup

Signed-off-by: AlexXi19 <[email protected]>

* fix: better process handling

Signed-off-by: AlexXi19 <[email protected]>

* chore: lint

Signed-off-by: AlexXi19 <[email protected]>

* chore: add license

Signed-off-by: AlexXi19 <[email protected]>

* fix: go.sum

Signed-off-by: AlexXi19 <[email protected]>

* chore: refine testing

Signed-off-by: AlexXi19 <[email protected]>

* chore: address comments

Signed-off-by: AlexXi19 <[email protected]>

* fix: issues

Signed-off-by: AlexXi19 <[email protected]>

* fix: go mod tidy and lint

Signed-off-by: AlexXi19 <[email protected]>

* chore: add cli flag for file sync

Signed-off-by: AlexXi19 <[email protected]>

* chore: address comments

Signed-off-by: AlexXi19 <[email protected]>

* chore: pass sync option to server

Signed-off-by: AlexXi19 <[email protected]>

* chore: update envd server dependency

Signed-off-by: AlexXi19 <[email protected]>

* chore: update envd server dependency

Signed-off-by: AlexXi19 <[email protected]>

---------

Signed-off-by: AlexXi19 <[email protected]>
Signed-off-by: Alex Xi <[email protected]>
  • Loading branch information
AlexXi19 authored Apr 21, 2023
1 parent 15f62cc commit e56981a
Show file tree
Hide file tree
Showing 21 changed files with 1,800 additions and 10 deletions.
39 changes: 39 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ require (
github.com/go-git/go-git/v5 v5.4.2
github.com/golang/mock v1.6.0
github.com/google/uuid v1.3.0
github.com/hashicorp/go-getter v1.7.1
github.com/mattn/go-isatty v0.0.18
github.com/moby/buildkit v0.11.4
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6
Expand All @@ -36,6 +37,7 @@ require (
github.com/sirupsen/logrus v1.9.0
github.com/spf13/viper v1.15.0
github.com/stretchr/testify v1.8.2
github.com/syncthing/syncthing v1.23.1
github.com/tensorchord/envd-server v0.0.27
github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea
github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f
Expand All @@ -48,13 +50,20 @@ require (
)

require (
cloud.google.com/go v0.110.0 // indirect
cloud.google.com/go/compute v1.18.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v0.12.0 // indirect
cloud.google.com/go/storage v1.28.1 // indirect
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
github.com/aws/aws-sdk-go v1.44.122 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f // indirect
github.com/cockroachdb/redact v1.1.3 // indirect
Expand All @@ -74,30 +83,45 @@ require (
github.com/go-git/go-billy/v5 v5.3.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/pprof v0.0.0-20221203041831-ce31453925ec // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
github.com/greatroar/blobloom v0.7.2 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
github.com/klauspost/compress v1.16.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.2 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
github.com/miscreant/miscreant.go v0.0.0-20200214223636-26d376326b75 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/locker v1.0.1 // indirect
Expand All @@ -110,20 +134,31 @@ require (
github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d // indirect
github.com/op/go-logging v0.0.0-20160211212156-b2cb9fa56473 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/petermattis/goid v0.0.0-20221202122410-a449aaf35945 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect
github.com/rivo/uniseg v0.4.3 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/segmentio/backo-go v1.0.0 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/shirou/gopsutil/v3 v3.22.11 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/thejerf/suture/v4 v4.0.2 // indirect
github.com/tonistiigi/fsutil v0.0.0-20230105215944-fb433841cbfa // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/xanzy/ssh-agent v0.3.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.40.0 // indirect
go.opentelemetry.io/otel v1.14.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 // indirect
Expand All @@ -133,9 +168,13 @@ require (
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/net v0.9.0 // indirect
golang.org/x/oauth2 v0.5.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/tools v0.7.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.110.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
Expand Down
Loading

0 comments on commit e56981a

Please sign in to comment.