clientIdhelper

package
v2.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

middlewarehelper 用于规范中间件的模块 中间件指的是一些有特殊业务用途的模块, 这个子模块是整个redishelper的一个基本组件

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = Options{
	ClientID: machineid.MachineIDStr,
}

Functions

func WithClientID

func WithClientID(clientID string) optparams.Option[Options]

WithClientID 中间件通用设置,设置客户端id

Types

type ClientIDAbc

type ClientIDAbc struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...optparams.Option[Options]) (*ClientIDAbc, error)

func (*ClientIDAbc) ClientID

func (l *ClientIDAbc) ClientID() string

ClientID 查看组件设置的客户端ID

type ClientIDInterface

type ClientIDInterface interface {
	//ClientID 查看组件设置的客户端ID
	ClientID() string
}

ClientIDInterface 作为客户端的接口,ClientID为识别自身的标识

type Options

type Options struct {
	ClientID string //客户端id
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL