module Ksuid::Partitioner

Defined in:

ksuid/partitioner.cr

Class Method Summary

Class Method Detail

def self.hostname : -> UInt32 #

Sets the partition based on the first 4 bytes of the hostname

This method is suited to containerized environments where the system hostname is guaranteed to be unique.


[View source]
def self.no_partitions : -> UInt32 #

Disables partitioning by always returning a partition of zero.


[View source]
def self.string(s : String) : -> UInt32 #

Sets the partition based on the first 4 bytes of the given string


[View source]