Documentation ¶
Index ¶
- func DailKafka(k *conf.KafkaConfig, kafkaOpts ...logkafka.KafkaOptionFunc) (sarama.Client, error)
- func ForceColor() bool
- func ForceNewKafkaClient(k *conf.KafkaConfig) sarama.Client
- func GetEnvFiles(root string) ([]string, error)
- func GetRandString(length int) string
- func InitTracer(endpoint string, serverName string) error
- func NewDiscoveryGrpcConn(ctx context.Context, conf *Backend, d registry.Discovery) (*grpc.ClientConn, error)
- func NewEtcdGrpcConn(ctx context.Context, conf *EtcdBackend) (*grpc.ClientConn, error)
- func NewKafkaClient(k *conf.KafkaConfig) (sarama.Client, error)
- func NewSignalGrpcConn(ctx context.Context, conf *Backend) (*grpc.ClientConn, error)
- func SortUUID() string
- func SortUUIDWithUUID(src uuid.UUID) string
- func TransLogrus(l *logrus.Logger) log.Logger
- func ValidateMac(mac string) (string, error)
- func WithDeviceIDRange[T constraints.Integer](start, end T) func(*gorm.DB) *gorm.DB
- func WithIDRange[T constraints.Ordered](start, end T) func(*gorm.DB) *gorm.DB
- type Backend
- type EtcdBackend
- type GrpcGatewayServer
- func (s *GrpcGatewayServer) Endpoint() (*url.URL, error)
- func (s *GrpcGatewayServer) Endpoints() ([]*url.URL, error)
- func (s *GrpcGatewayServer) GrpcRegistrar() grpc.ServiceRegistrar
- func (s *GrpcGatewayServer) HttpRegistrar() *ghttp.Server
- func (s *GrpcGatewayServer) Start(ctx context.Context) error
- func (s *GrpcGatewayServer) Stop(ctx context.Context) error
- type Logger
- type Scope
- func WithDeviceIDEq[T constraints.Integer](id T) Scope
- func WithIDEq[T constraints.Ordered](id T) Scope
- func WithOrder(order string) Scope
- func WithPageAndPageSize[T constraints.Integer](page, pageSize T) Scope
- func WithTimestampAfter(t int64) Scope
- func WithTimestampBefore(t int64) Scope
- func WithUserIDEq(id string) Scope
- type TCPHandler
- type TcpServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DailKafka ¶ added in v0.3.2
func DailKafka(k *conf.KafkaConfig, kafkaOpts ...logkafka.KafkaOptionFunc) (sarama.Client, error)
func ForceColor ¶
func ForceColor() bool
func ForceNewKafkaClient ¶ added in v0.2.4
func ForceNewKafkaClient(k *conf.KafkaConfig) sarama.Client
func GetEnvFiles ¶
func GetRandString ¶ added in v0.3.0
func InitTracer ¶ added in v0.4.1
func NewDiscoveryGrpcConn ¶
func NewEtcdGrpcConn ¶
func NewEtcdGrpcConn(ctx context.Context, conf *EtcdBackend) (*grpc.ClientConn, error)
func NewKafkaClient ¶ added in v0.2.4
func NewKafkaClient(k *conf.KafkaConfig) (sarama.Client, error)
func NewSignalGrpcConn ¶
func SortUUIDWithUUID ¶ added in v0.2.0
func ValidateMac ¶ added in v0.3.0
func WithDeviceIDRange ¶ added in v0.2.2
func WithIDRange ¶ added in v0.2.2
Types ¶
type EtcdBackend ¶
type GrpcGatewayServer ¶
type GrpcGatewayServer struct {
// contains filtered or unexported fields
}
func NewGrpcGatewayServer ¶
func NewGrpcGatewayServer(config *conf.GrpcServerConfig) *GrpcGatewayServer
func (*GrpcGatewayServer) GrpcRegistrar ¶
func (s *GrpcGatewayServer) GrpcRegistrar() grpc.ServiceRegistrar
func (*GrpcGatewayServer) HttpRegistrar ¶
func (s *GrpcGatewayServer) HttpRegistrar() *ghttp.Server
type Scope ¶ added in v0.3.0
func WithDeviceIDEq ¶ added in v0.2.2
func WithDeviceIDEq[T constraints.Integer](id T) Scope
func WithIDEq ¶ added in v0.2.2
func WithIDEq[T constraints.Ordered](id T) Scope
func WithPageAndPageSize ¶ added in v0.2.1
func WithPageAndPageSize[T constraints.Integer](page, pageSize T) Scope
func WithTimestampAfter ¶ added in v0.2.2
func WithTimestampBefore ¶ added in v0.2.2
func WithUserIDEq ¶ added in v0.3.3
type TcpServer ¶
type TcpServer struct {
// contains filtered or unexported fields
}
func NewTcpServer ¶
func NewTcpServer(conf *conf.TcpServer, handler TCPHandler) *TcpServer
Click to show internal directories.
Click to hide internal directories.