Documentation ¶
Index ¶
- Constants
- Variables
- func SetContext(c context.Context)
- func SetLogger(l Logger)
- func SetVersion(v string)
- type Logger
- type Options
- type SchemaValidator
- type SrvCheckCmd
- type SrvInfoCmd
- type SrvLsCmd
- type SrvMappingCmd
- type SrvPasswdCmd
- type SrvPingCmd
- type SrvRaftCmd
- type SrvReportCmd
- type SrvRequestCmd
- type SrvRunCmd
- type SrvRunConfig
Constants ¶
View Source
const ( DefaultDurableConsumerName string = "natscli-bench" DefaultStreamName string = "benchstream" )
Variables ¶
View Source
var SkipContexts bool
SkipContexts used during tests
View Source
var (
Version = "development"
)
Functions ¶
func SetVersion ¶
func SetVersion(v string)
Types ¶
type Logger ¶
type Logger interface { Printf(format string, a ...interface{}) Fatalf(format string, a ...interface{}) Print(a ...interface{}) Fatal(a ...interface{}) Println(a ...interface{}) }
Logger provides a plugable logger implementation
type Options ¶
type Options struct { // Config is a nats configuration context Config *natscontext.Context // Servers is the list of servers to connect to Servers string // Creds is nats credentials to authenticate with Creds string // TlsCert is the TLS Public Certificate TlsCert string // TlsKey is the TLS Private Key TlsKey string // TlsCA is the certificate authority to verify the connection with TlsCA string // Timeout is how long to wait for operations Timeout time.Duration // ConnectionName is the name to use for the underlying NATS connection ConnectionName string // Username is the username or token to connect with Username string // Password is the password to connect with Password string // Nkey is the file holding a nkey to connect with Nkey string // JsApiPrefix is the JetStream API prefix JsApiPrefix string // JsEventPrefix is the JetStream events prefix JsEventPrefix string // JsDomain is the domain to connect to JsDomain string // CfgCtx is the context name to use CfgCtx string // Trace enables verbose debug logging Trace bool // Customer inbox Prefix InboxPrefix string // Conn sets a prepared connect to connect with Conn *nats.Conn // Mgr sets a prepared jsm Manager to use for JetStream access Mgr *jsm.Manager // JSc is a prepared NATS JetStream context to use for KV and Object access JSc nats.JetStreamContext // Disables registering of CLI cheats NoCheats bool }
Options configure the CLI
func ConfigureInApp ¶
func ConfigureInApp(app *fisk.Application, cliOpts *Options, prepare bool, disable ...string) (*Options, error)
ConfigureInApp attaches the cli commands to app, prepare will load the context on demand and should be true unless override nats, manager and js context is given in a custom PreAction in the caller. Disable is a list of command names to skip.
func ConfigureInCommand ¶
func ConfigureInCommand(cmd *fisk.CmdClause, cliOpts *Options, prepare bool, disable ...string) (*Options, error)
ConfigureInCommand attaches the cli commands to cmd, prepare will load the context on demand and should be true unless override nats, manager and js context is given in a custom PreAction in the caller. Disable is a list of command names to skip.
type SchemaValidator ¶
type SchemaValidator struct{}
func (SchemaValidator) ValidateStruct ¶
func (v SchemaValidator) ValidateStruct(data interface{}, schemaType string) (ok bool, errs []string)
type SrvCheckCmd ¶
type SrvCheckCmd struct {
// contains filtered or unexported fields
}
type SrvInfoCmd ¶
type SrvInfoCmd struct {
// contains filtered or unexported fields
}
type SrvMappingCmd ¶
type SrvMappingCmd struct {
// contains filtered or unexported fields
}
type SrvPasswdCmd ¶
type SrvPasswdCmd struct {
// contains filtered or unexported fields
}
type SrvPingCmd ¶
type SrvPingCmd struct {
// contains filtered or unexported fields
}
type SrvRaftCmd ¶
type SrvRaftCmd struct {
// contains filtered or unexported fields
}
type SrvReportCmd ¶
type SrvReportCmd struct {
// contains filtered or unexported fields
}
type SrvRequestCmd ¶
type SrvRequestCmd struct {
// contains filtered or unexported fields
}
type SrvRunConfig ¶
type SrvRunConfig struct { Name string Port string UserPassword string UserPasswordCrypt string ServicePassword string ServicePasswordCrypt string SystemPassword string SystemPasswordCrypt string ExtendDemoNetwork bool ExtendWithContext bool JetStream bool JSDomain string Verbose bool Debug bool StoreDir string Listen string Clean bool Context *natscontext.Context }
Source Files ¶
- account_command.go
- backup_command.go
- bench_command.go
- cli.go
- consumer_command.go
- context_command.go
- errors_command.go
- events_command.go
- governor_command.go
- jsonschema.go
- kv_command.go
- latency_command.go
- object_command.go
- pub_command.go
- reply_command.go
- restore_command.go
- rtt_command.go
- schema_command.go
- schema_info_command.go
- schema_search_command.go
- schema_validate_command.go
- server_check_command.go
- server_command.go
- server_info_command.go
- server_list_command.go
- server_mapping_command.go
- server_mkpasswd_command.go
- server_ping_command.go
- server_raft_command.go
- server_report_command.go
- server_request_command.go
- server_run_command.go
- stream_command.go
- sub_command.go
- traffic_command.go
- util.go
Click to show internal directories.
Click to hide internal directories.