Documentation
¶
Overview ¶
Package ctl is the admin verb set shared by mashctl and the deprecated `mash admin`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RevokeUsers func(ctx context.Context, cfg config.Config, users []string, stdout io.Writer) error
RevokeUsers revokes NATS user keys in the account JWT; mashctl sets it, which has the key store. The system account credentials come from MASH_SYS_CREDS or the init server's sys.creds, the server count from MASH_SERVERS. It stays nil in `mash admin`, which has neither: deprovision then only advises.
Functions ¶
func NoRevokeWarning ¶ added in v0.3.3
NoRevokeWarning is the stderr block for a removal with --no-revoke: the user key keeps working.
func OpenAdmin ¶ added in v0.3.3
OpenAdmin connects to the server with the admin credentials and returns the admin handle, a context carrying the command's deadline (admin_timeout, else 30 seconds) and a func that releases both. prog is the command prefix of error text. The caller must call the func when done.
func Run ¶
Run executes one admin verb. prog is the command prefix used in usage and error text: "mashctl" or "mash admin".
Types ¶
This section is empty.