Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DetShard ¶
type DetShard struct {
// contains filtered or unexported fields
}
DetShard implements Shard
func (*DetShard) GetAddress ¶
GetAddress returns the Shard's address in a usable form
type DeterministicSharder ¶
type DeterministicSharder struct { Config config.Config `inject:""` Logger logger.Logger `inject:""` Peers peer.Peers `inject:""` // contains filtered or unexported fields }
func (*DeterministicSharder) MyShard ¶
func (d *DeterministicSharder) MyShard() Shard
func (*DeterministicSharder) Start ¶
func (d *DeterministicSharder) Start() error
func (*DeterministicSharder) WhichShard ¶
func (d *DeterministicSharder) WhichShard(traceID string) Shard
type Shard ¶
type Shard interface { Equals(Shard) bool // GetAddress returns a string suitable for use in building a URL, eg // http://refinery-1234:8080 or https://10.2.3.4 GetAddress() string }
Shard repreesents a single instance of Refinery.
type Sharder ¶
type Sharder interface { // MyShard returns the Shard representing this process MyShard() Shard // WhichShard takes in a trace ID as input and returns the shard responsible // for that trace ID WhichShard(string) Shard }
Sharder is for determining which shard should handle a specific trace ID
type SingleServerSharder ¶
func (*SingleServerSharder) MyShard ¶
func (s *SingleServerSharder) MyShard() Shard
func (*SingleServerSharder) WhichShard ¶
func (s *SingleServerSharder) WhichShard(traceID string) Shard
type SingleShard ¶
type SingleShard string
SingleShard implements the Shard interface
func (*SingleShard) Equals ¶
func (s *SingleShard) Equals(other Shard) bool
func (*SingleShard) GetAddress ¶
func (s *SingleShard) GetAddress() string
GetAddress will never be used because every shard is my shard
type SortableShardList ¶
type SortableShardList []*DetShard
func (SortableShardList) Equals ¶
func (s SortableShardList) Equals(other SortableShardList) bool
func (SortableShardList) Len ¶
func (s SortableShardList) Len() int
func (SortableShardList) Less ¶
func (s SortableShardList) Less(i, j int) bool
func (SortableShardList) Swap ¶
func (s SortableShardList) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.