cloudfoundry/go-fetcher

Name: go-fetcher

Owner: Cloud Foundry

Description: null

Created: 2016-04-26 00:43:07.0

Updated: 2018-04-13 14:14:39.0

Pushed: 2018-04-16 23:32:55.0

Homepage: null

Size: 426

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

go-fetcher

This repository contains code for a go get routing service which allows packages from multiple locations to appear to be centralized in one location. This also allows the packages to be moved to other locations without breaking imports.

Building

In order to build the package, the following dependencies must be met:

To build the Go binary:

et github.com/cloudfoundry/go-fetcher
Running Tests

We are using Ginkgo to run tests.

Be sure to install protobuf with go get github.com/golang/protobuf/proto.

Run ginkgo from the root of the repository to run all tests.

Configuring

You will need to create a configuration for go-fetcher:

> config.json << END

mportPrefix": "example.com",
rgList": [
"https://github.com/cloudfoundry/",
"https://github.com/cloudfoundry-incubator/",
"https://github.com/cloudfoundry-attic/"

oRedirectAgents": [
"Go-http-client",
"GoDocBot"

verrides": {
"stager": "https://github.com/cloudfoundry-incubator/stager"



Running locally

The go-fetcher program expects environment variables to be set which indicate the port to listen on and the name of the configuration file.

nerate_local && PORT=8800 CONFIG="config.json" go run main.go

Deploying to Cloud Foundry

Deploying to Cloud Foundry is straight forward, but requires you to do so from the checked out repository so that cf can recognize and upload the package. You will need to create a manifest.yml to accompany your config.json:

> manifest.yml << END
ication:
name: example

PACKAGENAME: github.com/cloudfoundry/go-fetcher/cmd/go-fetcher
VERSION: go1.6
NFIG: config.json

Then, login to your cf instance and push the application:

ogin ...
ush example

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.