Switch remote deploy to vendored source builds
Move remote deployment to a vendored source bundle built on the target host via Docker so redeploys no longer require local cross-compilation or host Go installation. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
27
vendor/github.com/bep/debounce/.gitignore
generated
vendored
Normal file
27
vendor/github.com/bep/debounce/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
|
||||
# Folders
|
||||
_obj
|
||||
_test
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
[568vq].out
|
||||
|
||||
*.cgo1.go
|
||||
*.cgo2.c
|
||||
_cgo_defun.c
|
||||
_cgo_gotypes.go
|
||||
_cgo_export.*
|
||||
|
||||
_testmain.go
|
||||
|
||||
*.exe
|
||||
*.test
|
||||
*.prof
|
||||
|
||||
cover.out
|
||||
nohup.out
|
||||
21
vendor/github.com/bep/debounce/LICENSE
generated
vendored
Normal file
21
vendor/github.com/bep/debounce/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Bjørn Erik Pedersen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
35
vendor/github.com/bep/debounce/README.md
generated
vendored
Normal file
35
vendor/github.com/bep/debounce/README.md
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
# Go Debounce
|
||||
|
||||
[](https://github.com/bep/debounce/actions?query=workflow:Test)
|
||||
[](https://godoc.org/github.com/bep/debounce)
|
||||
[](https://goreportcard.com/report/github.com/bep/debounce)
|
||||
[](https://codecov.io/gh/bep/debounce)
|
||||
[](https://github.com/bep/debounce/releases/latest)
|
||||
|
||||
## Example
|
||||
|
||||
```go
|
||||
func ExampleNew() {
|
||||
var counter uint64
|
||||
|
||||
f := func() {
|
||||
atomic.AddUint64(&counter, 1)
|
||||
}
|
||||
|
||||
debounced := debounce.New(100 * time.Millisecond)
|
||||
|
||||
for i := 0; i < 3; i++ {
|
||||
for j := 0; j < 10; j++ {
|
||||
debounced(f)
|
||||
}
|
||||
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
}
|
||||
|
||||
c := int(atomic.LoadUint64(&counter))
|
||||
|
||||
fmt.Println("Counter is", c)
|
||||
// Output: Counter is 3
|
||||
}
|
||||
```
|
||||
|
||||
43
vendor/github.com/bep/debounce/debounce.go
generated
vendored
Normal file
43
vendor/github.com/bep/debounce/debounce.go
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
// Copyright © 2019 Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>.
|
||||
//
|
||||
// Use of this source code is governed by an MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package debounce provides a debouncer func. The most typical use case would be
|
||||
// the user typing a text into a form; the UI needs an update, but let's wait for
|
||||
// a break.
|
||||
package debounce
|
||||
|
||||
import (
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
// New returns a debounced function that takes another functions as its argument.
|
||||
// This function will be called when the debounced function stops being called
|
||||
// for the given duration.
|
||||
// The debounced function can be invoked with different functions, if needed,
|
||||
// the last one will win.
|
||||
func New(after time.Duration) func(f func()) {
|
||||
d := &debouncer{after: after}
|
||||
|
||||
return func(f func()) {
|
||||
d.add(f)
|
||||
}
|
||||
}
|
||||
|
||||
type debouncer struct {
|
||||
mu sync.Mutex
|
||||
after time.Duration
|
||||
timer *time.Timer
|
||||
}
|
||||
|
||||
func (d *debouncer) add(f func()) {
|
||||
d.mu.Lock()
|
||||
defer d.mu.Unlock()
|
||||
|
||||
if d.timer != nil {
|
||||
d.timer.Stop()
|
||||
}
|
||||
d.timer = time.AfterFunc(d.after, f)
|
||||
}
|
||||
Reference in New Issue
Block a user