Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source interface { // StartAfter positions this Source to begin iterating alphabetically after this user. If this user sorts (case // insensitively) outside of the first or last user, the first user is returned. StartAfter(user string) NextUser() string Contains(user string) bool }
Source represents a source of usernames for rotation.
type StaticSource ¶
type StaticSource struct {
// contains filtered or unexported fields
}
StaticSource is a base implementation of static list of usernames.
func NewStaticSource ¶
func NewStaticSource(users ...string) *StaticSource
NewStaticSource creates a StaticSource of all lower-cased and sorted from the specified users.
func (*StaticSource) Contains ¶
func (ss *StaticSource) Contains(user string) bool
func (*StaticSource) NextUser ¶
func (ss *StaticSource) NextUser() string
func (*StaticSource) StartAfter ¶
func (ss *StaticSource) StartAfter(user string)
Click to show internal directories.
Click to hide internal directories.