github.com/ssdev-go/moby@v17.12.1-ce-rc2+incompatible/client/swarm_join.go (about) 1 package client 2 3 import ( 4 "github.com/docker/docker/api/types/swarm" 5 "golang.org/x/net/context" 6 ) 7 8 // SwarmJoin joins the swarm. 9 func (cli *Client) SwarmJoin(ctx context.Context, req swarm.JoinRequest) error { 10 resp, err := cli.post(ctx, "/swarm/join", nil, req, nil) 11 ensureReaderClosed(resp) 12 return err 13 }