controller

package
v0.0.0-...-61a4d47 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

发号器使用 Redis 实现,预先分配了 N 个 key, 它们会被分布到 M 个节点上(后期可以考虑 twemproxy 与 Redis 集群通信)

Index

Constants

This section is empty.

Variables

View Source
var ErrNotReady = errors.New("code generator is not ready")

Functions

func GenerateShortURL

func GenerateShortURL(url string) (string, error)

func NextID

func NextID() (int, error)

NextID 产生下一个可用的 id

func URLByCode

func URLByCode(code string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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