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