src

module
v0.0.0-...-f23eb64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2024 License: Apache-2.0

README

Source Code

This directory contains the source code for Cloud Robotics Core components. Most components are written in Go.

Go

The Gazelle tool manages bazel BUILD files for Go.

Dependencies

To automatically update dependencies in bazel BUILD files run:

bazel run //:gazelle

To re-generate Go modules dependencies run this from the top-level source directory:

./src/gomod.sh

This will always download the latest stable tag of a go module. To use a specific version run eg::

cd src
# use an older version, that the latest stable
go get -d github.com/mitchellh/go-server-timing@v1.0.1
# use a specific, yet untagged version
go get -d github.com/mitchellh/go-server-timing@feb680ab92c20d57c527399b842e1941bde888c3
# to also upgrade dependencies, use:
go get -d -u github.com/mitchellh/go-server-timing@v1.0.1

More tips on this one-pager

Licenses

Install go-license:

go install github.com/google/go-licenses@latest

run it:

cd src
# get a vsc of all licenses
~/go/bin/go-licenses csv .
# check for bad (forbidden) licenses, should be empty
~/go/bin/go-licenses check ./...
Docs

In order to force a new snapshot, run

VERSION=$(curl -s https://proxy.golang.org/github.com/googlecloudrobotics/core/@latest | jq -r ".Version")
echo "https://pkg.go.dev/github.com/googlecloudrobotics/core/src/go@${VERSION}"

and open the printed link. Then that version is part of the history.

third party

We track some external deps through nvchecker. Get the tool by running:

pip3 install nvchecker

Below are sample commands for the common workflows. Run all those from the root of the repo.

Add new dependency by adding a blob to nvchecker.toml:

[ingress-nginx]
source = "container"
registry = "k8s.gcr.io"
container = "ingress-nginx/controller"
prefix = "v"

Get initial version (use same command to update the version):

$ nvtake -c nvchecker.toml ingress-nginx=0.44.0

After updating, please also manually keep METADATA file in sync.

Check for updates:

$ nvchecker -c nvchecker.toml
[I 09-06 12:26:20.253 core:354] ingress-nginx: updated from 0.44.0 to 1.0.0

Directories

Path Synopsis
go
cmd/app-rollout-controller
Runs the app rollout controller which creates and deletes Kubernetes deployments to bring them into agreement with configuration.
Runs the app rollout controller which creates and deletes Kubernetes deployments to bring them into agreement with configuration.
cmd/chart-assignment-controller
Package main defines the entry point for the chart assignment controller service.
Package main defines the entry point for the chart assignment controller service.
cmd/cr-syncer
The CR syncer syncs custom resources between a remote Kubernetes cluster and the local Kubernetes cluster.
The CR syncer syncs custom resources between a remote Kubernetes cluster and the local Kubernetes cluster.
cmd/http-relay-client
Package main runs a local HTTP relay client.
Package main runs a local HTTP relay client.
cmd/http-relay-client/client
Package main runs a local HTTP relay client.
Package main runs a local HTTP relay client.
cmd/http-relay-server
Package main runs a multiplexing HTTP relay server.
Package main runs a multiplexing HTTP relay server.
cmd/metadata-server
Package main runs a local http server providing details about the connected cloud project.
Package main runs a local http server providing details about the connected cloud project.
cmd/token-vendor/repository
Package repository defines the api for the pub key stores
Package repository defines the api for the pub key stores
pkg/client/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
pkg/client/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
pkg/client/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
pkg/client/versioned/typed/apps/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
pkg/client/versioned/typed/apps/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
pkg/client/versioned/typed/registry/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
pkg/client/versioned/typed/registry/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
pkg/gcr
Library for updating the token used to pull images from GCR in the surrounding cluster.
Library for updating the token used to pull images from GCR in the surrounding cluster.
pkg/kubetest
Package kubetest provides functionality to create local Kubernetes test clusters and run tests against them.
Package kubetest provides functionality to create local Kubernetes test clusters and run tests against them.
pkg/robotauth
The robotauth package contains the class for reading and writing the robot-id.json file.
The robotauth package contains the class for reading and writing the robot-id.json file.
pkg/synk
Package synk contains functionality to synchronize a batch of resources with a cluster while correctly handling CRDs and deletions.
Package synk contains functionality to synchronize a batch of resources with a cluster while correctly handling CRDs and deletions.
proto
http-relay
package http_relay is generated by the proto compiler during the build process.
package http_relay is generated by the proto compiler during the build process.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL