https://github.com/danielgatis/go-discovery
A collection of service discovery implementations.
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.2%) to scientific vocabulary
Keywords
Repository
A collection of service discovery implementations.
Basic Info
Statistics
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 3
- Releases: 0
Topics
Metadata Files
README.md
Go - Discovery
A collection of service discovery implementations.
Install
bash
go get -u github.com/danielgatis/go-discovery
And then import the package in your code:
go
import "github.com/danielgatis/go-discovery"
Example
An example described below is one of the use cases.
```go package main
import ( "context" "flag" "fmt" "time"
"github.com/danielgatis/go-ctrlc"
"github.com/danielgatis/go-discovery"
"github.com/sirupsen/logrus"
)
var ( port int )
func init() { flag.IntVar(&port, "port", 3001, "port number") }
func main() { flag.Parse()
discovery := discovery.NewMdnsDiscovery(fmt.Sprintf("test:%d", port), "_test._tcp", "local.", port, logrus.StandardLogger())
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
ctrlc.Watch(func() {
cancel()
})
go func() {
discovery.Register(ctx)
}()
for {
select {
case <-ctx.Done():
return
default:
peers, err := discovery.Lookup()
if err != nil {
logrus.Fatal(err)
}
for _, peer := range peers {
logrus.Info(peer)
}
}
}
} ```
❯ go run main.go -p 3001
❯ go run main.go -p 3002
License
Copyright (c) 2021-present Daniel Gatis
Licensed under MIT License
Buy me a coffee
Liked some of my work? Buy me a coffee (or more likely a beer)
Owner
- Name: Daniel Gatis
- Login: danielgatis
- Kind: user
- Location: Recife - PE
- Repositories: 37
- Profile: https://github.com/danielgatis
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 0
- Total pull requests: 11
- Average time to close issues: N/A
- Average time to close pull requests: 2 days
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.18
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 11
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- dependabot[bot] (10)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 1
- Total dependent repositories: 2
- Total versions: 3
proxy.golang.org: github.com/danielgatis/go-discovery
- Homepage: https://github.com/danielgatis/go-discovery
- Documentation: https://pkg.go.dev/github.com/danielgatis/go-discovery#section-documentation
- License: MIT
-
Latest release: v0.0.0-20230228134354-e919b88b9862
published almost 3 years ago
Rankings
Dependencies
- github.com/cenkalti/backoff v2.2.1+incompatible
- github.com/danielgatis/go-ctrlc v0.0.0-20220106020729-d49368c8200e
- github.com/danielgatis/go-discovery v0.0.0-20220105045447-b06a5315efe1
- github.com/davecgh/go-spew v1.1.1
- github.com/go-logr/logr v1.2.0
- github.com/gogo/protobuf v1.3.2
- github.com/golang/protobuf v1.5.2
- github.com/google/go-cmp v0.5.5
- github.com/google/gofuzz v1.1.0
- github.com/googleapis/gnostic v0.5.5
- github.com/grandcat/zeroconf v1.0.0
- github.com/json-iterator/go v1.1.12
- github.com/miekg/dns v1.1.27
- github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
- github.com/modern-go/reflect2 v1.0.2
- github.com/sirupsen/logrus v1.8.1
- golang.org/x/crypto v0.0.0-20210817164053-32db794688a5
- golang.org/x/net v0.0.0-20211209124913-491a49abca63
- golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f
- golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e
- golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b
- golang.org/x/text v0.3.7
- golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
- google.golang.org/appengine v1.6.7
- google.golang.org/protobuf v1.27.1
- gopkg.in/inf.v0 v0.9.1
- gopkg.in/yaml.v2 v2.4.0
- gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
- k8s.io/api v0.23.1
- k8s.io/apimachinery v0.23.1
- k8s.io/client-go v0.23.1
- k8s.io/klog/v2 v2.30.0
- k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65
- k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b
- sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6
- sigs.k8s.io/structured-merge-diff/v4 v4.1.2
- sigs.k8s.io/yaml v1.2.0
- 587 dependencies
- github.com/cenkalti/backoff v2.2.1+incompatible
- github.com/davecgh/go-spew v1.1.1
- github.com/go-logr/logr v1.2.0
- github.com/gogo/protobuf v1.3.2
- github.com/golang/protobuf v1.5.2
- github.com/google/go-cmp v0.5.5
- github.com/google/gofuzz v1.1.0
- github.com/googleapis/gnostic v0.5.5
- github.com/grandcat/zeroconf v1.0.0
- github.com/json-iterator/go v1.1.12
- github.com/miekg/dns v1.1.27
- github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
- github.com/modern-go/reflect2 v1.0.2
- github.com/sirupsen/logrus v1.8.1
- golang.org/x/crypto v0.0.0-20210817164053-32db794688a5
- golang.org/x/net v0.0.0-20211209124913-491a49abca63
- golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f
- golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e
- golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b
- golang.org/x/text v0.3.7
- golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
- google.golang.org/appengine v1.6.7
- google.golang.org/protobuf v1.27.1
- gopkg.in/inf.v0 v0.9.1
- gopkg.in/yaml.v2 v2.4.0
- gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
- k8s.io/api v0.23.1
- k8s.io/apimachinery v0.23.1
- k8s.io/client-go v0.23.1
- k8s.io/klog/v2 v2.30.0
- k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65
- k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b
- sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6
- sigs.k8s.io/structured-merge-diff/v4 v4.1.2
- sigs.k8s.io/yaml v1.2.0
- 585 dependencies
