Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Commit

Permalink
Adding deprecation message for token based discovery.
Browse files Browse the repository at this point in the history
Token based discovery, which is the default discovery mechanism, will be
deprecated in release 1.2.8, and replaced by a new mechanism that is
backed by Docker Swarm mode.

Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
  • Loading branch information
nishanttotla committed Jun 29, 2017
1 parent 2a5cfd9 commit aec60f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ package cli
import (
"fmt"
"log"
"os"

"github.com/docker/swarm/discovery/token"
"github.com/urfave/cli"
)

const tokenDeprecationErr = "Token based discovery is being deprecated in the next release (1.2.8).\nIt will be replaced by a default discovery backed by Docker Swarm Mode.\nOther mechanisms such as consul and etcd will continue to work.\n"

func create(c *cli.Context) {
if len(c.Args()) != 0 {
log.Fatalf("the `create` command takes no arguments. See '%s create --help'.", c.App.Name)
Expand All @@ -18,5 +21,6 @@ func create(c *cli.Context) {
if err != nil {
log.Fatal(err)
}
fmt.Fprintf(os.Stderr, tokenDeprecationErr)
fmt.Println(token)
}

0 comments on commit aec60f5

Please sign in to comment.