kubernetes/test/images/agnhost/guestbook/guestbook.go

var CmdGuestbook

var httpPort

var backendPort

var replicaOf

var replicas

var store

const timeout

const sleep

func init() {}

func main(cmd *cobra.Command, args []string) {}

func registerNode(registerTo, port string) {}

func startHTTPServer(port string) {}

// registerHandler will register the caller in this server's list of replicas.
// /set requests will be propagated to replicas, if any.
func registerHandler(w http.ResponseWriter, r *http.Request) {}

// getHandler will return '{"data": value}', where value is the stored value for
// the given key if non-empty, or entire store.
func getHandler(w http.ResponseWriter, r *http.Request) {}

// setHandler will set the given key-value pair in its own store and propagate
// it to its replicas, if any. Will return '{"message": "Updated"}' to the caller on success.
func setHandler(w http.ResponseWriter, r *http.Request) {}

// guestbookHandler will proxy the request to agnhost-primary if the given cmd is
// 'set' or agnhost-replica if the given cmd is 'get'.
func guestbookHandler(w http.ResponseWriter, r *http.Request) {}

func dialHTTP(request, hostPort string) (string, error) {}

func createHTTPClient(transport *http.Transport) *http.Client {}

func getIP(hostPort string) (net.IP, error) {}