mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-21 20:32:46 +08:00
go1.16 (#14783)
This commit is contained in:
.drone.ymlDockerfileDockerfile.rootlessMakefile
docs
go.modgo.sumvendor
github.com
Microsoft/go-winio
.gitignoreLICENSEREADME.mdbackup.goea.gofile.gofileinfo.gogo.modgo.sumhvsock.gopipe.go
pkg/guid
privilege.goreparse.gosd.gosyscall.gozsyscall_windows.goblevesearch
bleve/v2
go.modgo.sum
index/scorch
builder.goempty.gointroducer.gomerge.gooptimize.gopersister.goregexp.goscorch.gosegment_plugin.gosnapshot_index.gosnapshot_index_dict.gosnapshot_index_tfr.gosnapshot_segment.gounadorned.go
search.goscorch_segment_api/v2
vellum
CONTRIBUTING.mdLICENSEREADME.mdautomaton.gobuilder.gocommon.godecoder_v1.goencoder_v1.goencoding.gofst.gofst_iterator.gogo.modgo.sum
levenshtein
merge_iterator.gopack.goregexp
registry.gotransducer.goutf8
vellum.govellum_mmap.govellum_nommap.gowriter.gozapx
v11
v12
v13
v14
v15
bradfitz/gomemcache/memcache
couchbase
go-couchbase
gomemcached
goutils/logging
vellum
editorconfig/editorconfig-core-go/v2
.editorconfig.golangci.yml.goreleaser.ymlCHANGELOG.mdMakefileREADME.mdcached_parser.goconfig.godefinition.goeditorconfig.gofnmatch.gogo.modgo.sumsimple_parser.go
gliderlabs/ssh
glycerine/go-unsnap-stream
go-asn1-ber/asn1-ber
go-chi/chi
go-openapi
analysis
errors
loads
spec
.golangci.ymlREADME.mdappveyor.ymldebug.goerrors.goexpander.gogo.modgo.sumnormalizer.gonormalizer_nonwindows.gonormalizer_windows.goresolver.goschema_loader.gosecurity_scheme.gounused.go
swag
validate
go-redis/redis/v8
go-swagger/go-swagger
cmd/swagger
generator
go-testfixtures/testfixtures/v3
golang/snappy
gorilla/mux
kevinburke/ssh_config
klauspost
compress/zstd
cpuid/v2
libdns/libdns
mailru/easyjson
markbates/goth
mholt/acmez
miekg/dns
.travis.ymlREADME.mdclient.godns.godnssec.godnssec_keygen.godnssec_keyscan.godnssec_privkey.godoc.goedns.gogenerate.gomsg.gomsg_helpers.gomsg_truncate.goscan.goscan_rr.goserve_mux.goserver.gosig0.gosvcb.gotsig.gotypes.goversion.gozduplicate.gozmsg.goztypes.go
minio
md5-simd
README.mdblock-generic.goblock16_amd64.sblock8_amd64.sblock_amd64.gogo.modgo.summd5-digest_amd64.gomd5-server_amd64.gomd5-util_amd64.gomd5.gomd5block_amd64.gomd5block_amd64.s
minio-go/v7
sha256-simd
.travis.ymlREADME.mdappveyor.ymlcpuid.gocpuid_amd64.gocpuid_arm.gocpuid_linux_arm64.gocpuid_other.gogo.modgo.sumsha256.gosha256blockAvx2_amd64.gosha256blockAvx2_amd64.ssha256blockAvx512_amd64.gosha256blockAvx_amd64.gosha256blockAvx_amd64.ssha256blockSha_amd64.gosha256blockSsse_amd64.gosha256blockSsse_amd64.ssha256block_amd64.gosha256block_arm64.gosha256block_other.go
mrjones/oauth
msteinert/pam
olekukonko/tablewriter
pierrec/lz4/v4
prometheus
common/model
procfs
Makefile.commonSECURITY.mdarp.gobuddyinfo.gocpuinfo.gocpuinfo_riscvx.gocrypto.gofixtures.ttarfscache.gogo.modgo.sum
internal/fs
loadavg.gomdstat.gomeminfo.gomountstats.gonet_conntrackstat.gonet_ip_socket.gonet_protocols.gonet_sockstat.gonet_softnet.gonet_tcp.gonet_udp.gonet_unix.goproc.goproc_cgroup.goproc_fdinfo.goproc_limits.goproc_ns.goproc_psi.goproc_stat.goschedstat.goslab.gostat.goxfrm.gozoneinfo.gorussross/blackfriday/v2
shurcooL/sanitized_anchor_name
spf13/afero
.travis.ymlREADME.mdafero.gobasepath.gocacheOnReadFs.gocopyOnWriteFs.gohttpFs.go
mem
memmap.goos.goreadonlyfs.goregexpfs.goulikunitz/xz
LICENSESECURITY.mdTODO.mdbits.gocrc.goformat.go
internal
lzma
bintree.gobitops.gobreader.gobuffer.gobytewriter.godecoder.godecoderdict.godirectcodec.godistcodec.goencoder.goencoderdict.gohashtable.goheader.goheader2.golengthcodec.goliteralcodec.gomatchalgorithm.gooperation.goprob.goproperties.gorangecodec.goreader.goreader2.gostate.gotreecodecs.gowriter.gowriter2.go
lzmafilter.gonone-check.goreader.gowriter.goxanzy/ssh-agent
go.mongodb.org/mongo-driver/bson/bsonrw
go.opentelemetry.io/otel
.gitignoreCHANGELOG.mdCODEOWNERSCONTRIBUTING.mdMakefileMakefile.protosREADME.mdRELEASING.md
codes
go.modgo.summetric
pre_release.shtrace.gotrace
version.gogo.uber.org
atomic
.codecov.yml.travis.ymlCHANGELOG.mdMakefileatomic.gobool.gobool_ext.godoc.goduration.goduration_ext.goerror.goerror_ext.gofloat64.gofloat64_ext.gogen.gogo.modgo.sumint32.goint64.gonocmp.gostring.gostring_ext.gouint32.gouint64.govalue.go
multierr
zap
golang.org/x
crypto
argon2
blake2b
chacha20
curve25519
ed25519
internal/subtle
poly1305
mod
net
context
idna
internal/socket
cmsghdr.gocmsghdr_bsd.gocmsghdr_linux_32bit.gocmsghdr_linux_64bit.gocmsghdr_solaris_64bit.gocmsghdr_stub.gocmsghdr_unix.goerror_unix.goiovec_32bit.goiovec_64bit.goiovec_solaris_64bit.goiovec_stub.gommsghdr_stub.gommsghdr_unix.gomsghdr_bsd.gomsghdr_bsdvar.gomsghdr_linux_32bit.gomsghdr_linux_64bit.gomsghdr_solaris_64bit.gomsghdr_stub.gomsghdr_zos_s390x.gonorace.gorace.gorawconn_mmsg.gorawconn_msg.gorawconn_nommsg.gorawconn_nomsg.gosys_bsd.gosys_const_unix.gosys_const_zos.gosys_linkname.gosys_linux.gosys_linux_riscv64.gosys_posix.gosys_stub.gosys_unix.gozsys_aix_ppc64.gozsys_linux_riscv64.go
ipv4
control_bsd.gocontrol_pktinfo.gocontrol_stub.gocontrol_unix.goicmp_stub.gopayload_cmsg.gopayload_nocmsg.gosockopt_posix.gosockopt_stub.gosys_aix.gosys_asmreq.gosys_asmreq_stub.gosys_asmreqn.gosys_asmreqn_stub.gosys_bpf.gosys_bpf_stub.gosys_bsd.gosys_ssmreq.gosys_ssmreq_stub.gosys_stub.gozsys_aix_ppc64.gozsys_linux_riscv64.go
ipv6
control_rfc2292_unix.gocontrol_rfc3542_unix.gocontrol_stub.gocontrol_unix.goicmp_bsd.goicmp_stub.gopayload_cmsg.gopayload_nocmsg.gosockopt_posix.gosockopt_stub.gosys_aix.gosys_asmreq.gosys_asmreq_stub.gosys_bpf.gosys_bpf_stub.gosys_bsd.gosys_ssmreq.gosys_ssmreq_stub.gosys_stub.gozsys_aix_ppc64.gozsys_linux_riscv64.go
oauth2
sys
cpu
cpu_aix.gocpu_gc_arm64.gocpu_gc_s390x.gocpu_gc_x86.gocpu_gccgo_arm64.gocpu_gccgo_s390x.gocpu_gccgo_x86.gocpu_linux.gocpu_linux_mips64x.gocpu_linux_noinit.gocpu_linux_ppc64x.gocpu_mips64x.gocpu_mipsx.gocpu_other_arm.gocpu_other_arm64.gocpu_other_mips64x.gocpu_ppc64x.gocpu_riscv64.gocpu_wasm.gocpu_x86.gosyscall_aix_gccgo.gosyscall_aix_ppc64_gc.go
unix
aliases.goasm_zos_s390x.scap_freebsd.goconstants.godev_aix_ppc.godev_aix_ppc64.godev_zos.godirent.goendian_big.goendian_little.goenv_unix.goepoll_zos.gofcntl.gofcntl_linux_32bit.gofdset.gofstatfs_zos.gogccgo.gogccgo_linux_amd64.goioctl.goioctl_zos.gomkerrors.shpagesize_unix.goptrace_darwin.goptrace_ios.gorace.gorace0.goreaddirent_getdents.goreaddirent_getdirentries.gosockcmsg_unix.gosockcmsg_unix_other.gostr.gosyscall.gosyscall_aix.gosyscall_aix_ppc.gosyscall_aix_ppc64.gosyscall_bsd.gosyscall_darwin.1_12.gosyscall_darwin.1_13.gosyscall_darwin.gosyscall_darwin_386.gosyscall_darwin_amd64.gosyscall_darwin_arm64.gosyscall_darwin_libSystem.gosyscall_dragonfly.gosyscall_dragonfly_amd64.gosyscall_freebsd.gosyscall_freebsd_386.gosyscall_freebsd_amd64.gosyscall_freebsd_arm.gosyscall_freebsd_arm64.gosyscall_illumos.gosyscall_linux.gosyscall_linux_386.gosyscall_linux_amd64.gosyscall_linux_amd64_gc.gosyscall_linux_arm.gosyscall_linux_arm64.gosyscall_linux_gc.gosyscall_linux_gc_386.gosyscall_linux_gc_arm.gosyscall_linux_gccgo_386.gosyscall_linux_gccgo_arm.gosyscall_linux_mips64x.gosyscall_linux_mipsx.gosyscall_linux_ppc64x.gosyscall_linux_riscv64.gosyscall_linux_s390x.gosyscall_linux_sparc64.gosyscall_netbsd.gosyscall_netbsd_386.gosyscall_netbsd_amd64.gosyscall_netbsd_arm.gosyscall_netbsd_arm64.gosyscall_openbsd.gosyscall_openbsd_386.gosyscall_openbsd_amd64.gosyscall_openbsd_arm.gosyscall_openbsd_arm64.gosyscall_solaris.gosyscall_solaris_amd64.gosyscall_unix.gosyscall_unix_gc.gosyscall_unix_gc_ppc64x.gosyscall_zos_s390x.gotimestruct.goxattr_bsd.gozerrors_aix_ppc.gozerrors_aix_ppc64.gozerrors_darwin_386.gozerrors_darwin_amd64.gozerrors_darwin_arm.gozerrors_darwin_arm64.gozerrors_dragonfly_amd64.gozerrors_freebsd_386.gozerrors_freebsd_amd64.gozerrors_freebsd_arm.gozerrors_freebsd_arm64.gozerrors_linux.gozerrors_linux_386.gozerrors_linux_amd64.gozerrors_linux_arm.gozerrors_linux_arm64.gozerrors_linux_mips.gozerrors_linux_mips64.gozerrors_linux_mips64le.gozerrors_linux_mipsle.gozerrors_linux_ppc64.gozerrors_linux_ppc64le.gozerrors_linux_riscv64.gozerrors_linux_s390x.gozerrors_linux_sparc64.gozerrors_netbsd_386.gozerrors_netbsd_amd64.gozerrors_netbsd_arm.gozerrors_netbsd_arm64.gozerrors_openbsd_386.gozerrors_openbsd_amd64.gozerrors_openbsd_arm.gozerrors_openbsd_arm64.gozerrors_openbsd_mips64.gozerrors_solaris_amd64.gozerrors_zos_s390x.gozptrace_armnn_linux.gozptrace_mipsnn_linux.gozptrace_mipsnnle_linux.gozptrace_x86_linux.gozsyscall_aix_ppc.gozsyscall_aix_ppc64.gozsyscall_aix_ppc64_gc.gozsyscall_aix_ppc64_gccgo.gozsyscall_darwin_386.1_13.gozsyscall_darwin_386.gozsyscall_darwin_amd64.1_13.gozsyscall_darwin_amd64.gozsyscall_darwin_arm.1_13.gozsyscall_darwin_arm.gozsyscall_darwin_arm64.1_13.gozsyscall_darwin_arm64.gozsyscall_dragonfly_amd64.gozsyscall_freebsd_386.gozsyscall_freebsd_amd64.gozsyscall_freebsd_arm.gozsyscall_freebsd_arm64.gozsyscall_illumos_amd64.gozsyscall_linux.gozsyscall_linux_386.gozsyscall_linux_amd64.gozsyscall_linux_arm.gozsyscall_linux_arm64.gozsyscall_linux_mips.gozsyscall_linux_mips64.gozsyscall_linux_mips64le.gozsyscall_linux_mipsle.gozsyscall_linux_ppc64.gozsyscall_linux_ppc64le.gozsyscall_linux_riscv64.gozsyscall_linux_s390x.gozsyscall_linux_sparc64.gozsyscall_netbsd_386.gozsyscall_netbsd_amd64.gozsyscall_netbsd_arm.gozsyscall_netbsd_arm64.gozsyscall_openbsd_386.gozsyscall_openbsd_amd64.gozsyscall_openbsd_arm.gozsyscall_openbsd_arm64.gozsyscall_openbsd_mips64.gozsyscall_solaris_amd64.gozsyscall_zos_s390x.gozsysctl_openbsd_386.gozsysctl_openbsd_amd64.gozsysctl_openbsd_arm.gozsysctl_openbsd_arm64.gozsysctl_openbsd_mips64.gozsysnum_darwin_386.gozsysnum_darwin_amd64.gozsysnum_darwin_arm.gozsysnum_darwin_arm64.gozsysnum_dragonfly_amd64.gozsysnum_freebsd_386.gozsysnum_freebsd_amd64.gozsysnum_freebsd_arm.gozsysnum_freebsd_arm64.gozsysnum_linux_386.gozsysnum_linux_amd64.gozsysnum_linux_arm.gozsysnum_linux_arm64.gozsysnum_linux_mips.gozsysnum_linux_mips64.gozsysnum_linux_mips64le.gozsysnum_linux_mipsle.gozsysnum_linux_ppc64.gozsysnum_linux_ppc64le.gozsysnum_linux_riscv64.gozsysnum_linux_s390x.gozsysnum_linux_sparc64.gozsysnum_netbsd_386.gozsysnum_netbsd_amd64.gozsysnum_netbsd_arm.gozsysnum_netbsd_arm64.gozsysnum_openbsd_386.gozsysnum_openbsd_amd64.gozsysnum_openbsd_arm.gozsysnum_openbsd_arm64.gozsysnum_openbsd_mips64.gozsysnum_zos_s390x.goztypes_aix_ppc.goztypes_aix_ppc64.goztypes_darwin_386.goztypes_darwin_amd64.goztypes_darwin_arm.goztypes_darwin_arm64.goztypes_dragonfly_amd64.goztypes_freebsd_386.goztypes_freebsd_amd64.goztypes_freebsd_arm.goztypes_freebsd_arm64.goztypes_linux.goztypes_linux_386.goztypes_linux_amd64.goztypes_linux_arm.goztypes_linux_arm64.goztypes_linux_mips.goztypes_linux_mips64.goztypes_linux_mips64le.goztypes_linux_mipsle.goztypes_linux_ppc64.goztypes_linux_ppc64le.goztypes_linux_riscv64.goztypes_linux_s390x.goztypes_linux_sparc64.goztypes_netbsd_386.goztypes_netbsd_amd64.goztypes_netbsd_arm.goztypes_netbsd_arm64.goztypes_openbsd_386.goztypes_openbsd_amd64.goztypes_openbsd_arm.goztypes_openbsd_arm64.goztypes_openbsd_mips64.goztypes_solaris_amd64.goztypes_zos_s390x.go
windows
gopkg.in/yaml.v3
modules.txt
31
vendor/github.com/bradfitz/gomemcache/memcache/memcache.go
generated
vendored
31
vendor/github.com/bradfitz/gomemcache/memcache/memcache.go
generated
vendored
@ -112,6 +112,7 @@ var (
|
||||
resultTouched = []byte("TOUCHED\r\n")
|
||||
|
||||
resultClientErrorPrefix = []byte("CLIENT_ERROR ")
|
||||
versionPrefix = []byte("VERSION")
|
||||
)
|
||||
|
||||
// New returns a memcache client using the provided server(s)
|
||||
@ -398,6 +399,30 @@ func (c *Client) flushAllFromAddr(addr net.Addr) error {
|
||||
})
|
||||
}
|
||||
|
||||
// ping sends the version command to the given addr
|
||||
func (c *Client) ping(addr net.Addr) error {
|
||||
return c.withAddrRw(addr, func(rw *bufio.ReadWriter) error {
|
||||
if _, err := fmt.Fprintf(rw, "version\r\n"); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := rw.Flush(); err != nil {
|
||||
return err
|
||||
}
|
||||
line, err := rw.ReadSlice('\n')
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
switch {
|
||||
case bytes.HasPrefix(line, versionPrefix):
|
||||
break
|
||||
default:
|
||||
return fmt.Errorf("memcache: unexpected response line from ping: %q", string(line))
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
func (c *Client) touchFromAddr(addr net.Addr, keys []string, expiration int32) error {
|
||||
return c.withAddrRw(addr, func(rw *bufio.ReadWriter) error {
|
||||
for _, key := range keys {
|
||||
@ -644,6 +669,12 @@ func (c *Client) DeleteAll() error {
|
||||
})
|
||||
}
|
||||
|
||||
// Ping checks all instances if they are alive. Returns error if any
|
||||
// of them is down.
|
||||
func (c *Client) Ping() error {
|
||||
return c.selector.Each(c.ping)
|
||||
}
|
||||
|
||||
// Increment atomically increments key by delta. The return value is
|
||||
// the new value after being incremented or an error. If the value
|
||||
// didn't exist in memcached the error is ErrCacheMiss. The value in
|
||||
|
Reference in New Issue
Block a user