Documentation ¶
Index ¶
Constants ¶
View Source
const ( DiscoveryWaySerf uint = iota DiscoveryWayMemberlist )
View Source
const ( RaftImplHashicorp uint = iota RaftImplEtcd )
View Source
const ( StorageWayMemory uint = iota StorageWayBolt StorageWayBadger StorageWayRedis )
View Source
const ( AuthModeAnonymous uint = iota AuthModeUsername AuthModeClientid )
View Source
const ( AuthDSFree uint = iota AuthDSRedis AuthDSMysql AuthDSPostgresql AuthDSHttp )
View Source
const ( BridgeWayNone uint = iota BridgeWayKafka )
Variables ¶
View Source
var ( ErrAuthWay = errors.New("auth-way is incorrectly configured") ErrStorageWay = errors.New("only redis can be used in cluster mode") ErrClusterOpts = errors.New("cluster options must be configured") ErrAppendCerts = errors.New("append ca cert failure") ErrMissingCertOrKey = errors.New("missing server certificate or private key files") )
Functions ¶
Types ¶
type Cluster ¶
type Cluster struct { DiscoveryWay uint `yaml:"discovery-way" json:"discovery-way"` NodeName string `yaml:"node-name" json:"node-name"` BindAddr string `yaml:"bind-addr" json:"bind-addr"` BindPort int `yaml:"bind-port" json:"bind-port"` AdvertiseAddr string `yaml:"advertise-addr" json:"advertise-addr"` AdvertisePort int `yaml:"advertise-port" json:"advertise-port"` Members []string `yaml:"members" json:"members"` QueueDepth int `yaml:"queue-depth" json:"queue-depth"` Tags map[string]string `yaml:"tags" json:"tags"` RaftImpl uint `yaml:"raft-impl" json:"raft-impl"` RaftPort int `yaml:"raft-port" json:"raft-port"` RaftDir string `yaml:"raft-dir" json:"raft-dir"` RaftBootstrap bool `yaml:"raft-bootstrap" json:"raft-bootstrap"` RaftLogLevel string `yaml:"raft-log-level" json:"raft-log-level"` GrpcEnable bool `yaml:"grpc-enable" json:"grpc-enable"` GrpcPort int `yaml:"grpc-port" json:"grpc-port"` InboundPoolSize int `yaml:"inbound-pool-size" json:"inbound-pool-size"` OutboundPoolSize int `yaml:"outbound-pool-size" json:"outbound-pool-size"` InoutPoolNonblocking bool `yaml:"inout-pool-nonblocking" json:"inout-pool-nonblocking"` NodesFileDir string `yaml:"nodes-file-dir" json:"nodes-file-dir"` }
type Config ¶
type Config struct { StorageWay uint `yaml:"storage-way"` StoragePath string `yaml:"storage-path"` BridgeWay uint `yaml:"bridge-way"` BridgePath string `yaml:"bridge-path"` Auth auth `yaml:"auth"` Mqtt mqtt `yaml:"mqtt"` Cluster Cluster `yaml:"cluster"` Redis redis `yaml:"redis"` Log log.Options `yaml:"log"` PprofEnable bool `yaml:"pprof-enable"` }
Click to show internal directories.
Click to hide internal directories.