Documentation ¶
Overview ¶
Package ring provides a high performance and thread safe bloom filter.
License ¶
Copyright (c) 2019 Tanner Ryan. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ring ¶
type Ring struct {
// contains filtered or unexported fields
}
Ring contains the information for a ring data store.
func Init ¶
Init initializes and returns a new ring, or an error. Given a number of elements, it accurately states if data is not added. Within a falsePositive rate, it will indicate if the data has been added.
func (*Ring) MarshalBinary ¶ added in v1.1.0
MarshalBinary implements the encoding.BinaryMarshaler interface.
func (*Ring) Test ¶
Test returns a bool if the data is in the ring. True indicates that the data may be in the ring, while false indicates that the data is not in the ring.
func (*Ring) UnmarshalBinary ¶ added in v1.1.0
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.