This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package expiremap | |
import ( | |
"sort" | |
"sync" | |
"time" | |
) | |
type val struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rabbitmq | |
import ( | |
"encoding/json" | |
"errors" | |
"fmt" | |
"github.com/sirupsen/logrus" | |
"github.com/streadway/amqp" | |
"google.golang.org/protobuf/proto" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package snowflake | |
import ( | |
"encoding/base64" | |
"encoding/binary" | |
"errors" | |
"fmt" | |
"strconv" | |
"sync" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ratelimit | |
import ( | |
"io" | |
"time" | |
) | |
// New 创建一个限数器 | |
// rate 速度,rate/每秒 | |
func New(rate int64) *Limiter { |
NewerOlder