Skip to content

Instantly share code, notes, and snippets.

@mpl
mpl / README.md
Last active November 4, 2019 09:46 — forked from jbdoumenjou/README.md
k8s crd services

Purpose

This gist contains examples of yaml configurations for the service load balancing in the k8s crd provider.

Goal

The goal is to expose:

  • a "user friendly" configuration (with potentialy complex usecases)
  • avoid confusion between K8s native objects and Traefik one
{
"servers": {
"src": {
"server": "http://11.22.3.4:3179",
"auth": "userpass:foo:bar",
"default": true
},
"dest": {
"server": "http://localhost:3179",
"auth": "userpass:foo:bar"
version: {branch}-{build}
branches:
only:
- master
- releases/0.10
skip_tags: true
image: Visual Studio 2015
clone_folder: c:\gopath\src\perkeep.org
environment:
GOPATH: c:\gopath
@mpl
mpl / keybase.md
Created April 21, 2018 22:18
keybase identity proof

Keybase proof

I hereby claim:

  • I am mpl on github.
  • I am mpl (https://keybase.io/mpl) on keybase.
  • I have a public key ASDZHu2skEuz3npWm13Kf8iVAi_WSbiLyes2dSp14LezAAo

To claim this, I am signing this object:

package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"strings"
"sync"
diff --git a/build/build.go b/build/build.go
index 3386d47..e97246b 100644
--- a/build/build.go
+++ b/build/build.go
@@ -10,13 +10,11 @@ import (
"go/types"
"io/ioutil"
"os"
- "os/exec"
"path/filepath"
Go side:
func main() {
js.Global.Set("HasGopherJS", true)
js.Global.Set("http", map[string]interface{}{
"GetFileTree": GetFileTree,
})
}
func GetFileTree(dirRef string) {
* `server`: The camlistored server to connect to, of the form:
"[http[s]://]host[:port][/prefix]". Defaults to https. This option can be
overriden with the "-server" command-line flag.
Most client commands are meant to communicate with a blobserver. For such commands, instead of the client relying on discovery to choose the actual URL, the server URL can point directly to a specific blobserver handler, of the form:
"[http[s]://]host[:port][/prefix][/handler/]".
For example, if one wanted to speed up syncing with `camtool sync`, one could write directly to the destination's blobserver, instead of the default, which is to write to both the destination blobserver and index. The above configuration sample can be extended by adding the following alias, where "`/bs/`" is the handler of the primary blobserver:
"servers": {
/*
Copyright 2013 The Go Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
package main
import (
"bytes"
"encoding/base64"
"flag"
"fmt"
"io"
"log"
"mime"