Skip to content
Snippets Groups Projects
Select Git revision
  • 07ab865bdc6cba6f7be122e07b7e1e452b34b794
  • without_tipselection default
  • develop protected
  • fix/grafana-local-dashboard
  • wasp
  • fix/dashboard-explorer-freeze
  • master
  • feat/timerqueue
  • test/sync_debug_and_650
  • feat/sync_revamp_inv
  • wip/sync
  • tool/db-recovery
  • portcheck/fix
  • fix/synchronization
  • feat/new-dashboard-analysis
  • feat/refactored-analysis-dashboard
  • feat/new-analysis-dashboard
  • test/demo-prometheus-fpc
  • prometheus_metrics
  • wip/analysis-server
  • merge/fpc-test-value-transfer
  • v0.2.2
  • v0.2.1
  • v0.2.0
  • v0.1.3
  • v0.1.2
  • v0.1.1
  • v0.1.0
28 results

autopeering.go

Blame
  • user avatar
    Jonas Theis authored and GitHub committed
    * Add docker compose for running integration tests.
    Runs entry_node and arbitrary number of peers in docker network
    
    * Fix permission denied in container if run without mounting a `rw` volume making it possible to run as throw-away container.
    Remove `VOLUME` from Dockerfile as this only pollutes host system with anonymous volumes.
    
    * Use named network for easier external use
    
    * Add test container that discovers peers and waits for autopeering to happen
    
    * Fix min waitForNeighbors
    
    * Add go.sum
    
    * Run integration tests with Github Actions
    
    * Added framework that abstracts the docker network and provides convenience functionality
    
    * Update directory in Github Actions
    
    * Add bash script for automated local test execution
    
    * Add getMessageByHash endpoint
    
    * Adjust to merge changes
    
    * Add methods to easily do HTTP POST requests
    
    * Added relay message test
    
    * Increase client timeout
    
    * Verbose output for tests makes it easier to follow the execution
    
    * Introduce small API wrapper for GoShimmer HTTP API
    
    * Adjust relay test to use new API wrapper
    
    * WIP: Docker logs
    
    * Fix issue with serving visualizer analysis server of entry node
    
    * Persist logs of containers after CI run
    
    * Fix test file
    
    * Fix uploading of artifacts
    
    * Save all containers' logs as artifacts
    
    * Create logs files also with local run
    
    * Add possibility to retrieve logs from a peer via Docker logs
    
    * Make tester part of the goshimmer module to make code sharing possible
    
    * Use client/lib to make HTTP requests in tester
    
    * Fix unit test directory
    
    * Add comments/doc to the code
    
    * Add readme
    
    * Move tester to own module and don't build container but use existing golang one instead
    
    * Address PR comments
    
    * Adjust to merge
    
    * Only use 1 config file for all containers
    
    * go mod tidy
    
    * Rename client lib base url
    14948393
    History
    autopeering.go 681 B
    package client
    
    import (
    	"fmt"
    	"net/http"
    
    	webapi_autopeering "github.com/iotaledger/goshimmer/plugins/webapi/autopeering"
    )
    
    const (
    	routeGetNeighbors = "autopeering/neighbors"
    )
    
    // GetNeighbors gets the chosen/accepted neighbors.
    // If knownPeers is set, also all known peers to the node are returned additionally.
    func (api *GoShimmerAPI) GetNeighbors(knownPeers bool) (*webapi_autopeering.Response, error) {
    	res := &webapi_autopeering.Response{}
    	if err := api.do(http.MethodGet, func() string {
    		if !knownPeers {
    			return routeGetNeighbors
    		}
    		return fmt.Sprintf("%s?known=1", routeGetNeighbors)
    	}(), nil, res); err != nil {
    		return nil, err
    	}
    	return res, nil
    }