Skip to content

Commit

Permalink
Merge pull request #127 from grafana/20220201_classify-memberlist-flags
Browse files Browse the repository at this point in the history
memberlist: Categorize advanced configuration parameters
  • Loading branch information
simonswine committed Feb 1, 2022
2 parents 675c737 + 5198121 commit 6910e2b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
34 changes: 17 additions & 17 deletions kv/memberlist/memberlist_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,37 +124,37 @@ func (c *Client) awaitKVRunningOrStopping(ctx context.Context) error {
// KVConfig is a config for memberlist.KV
type KVConfig struct {
// Memberlist options.
NodeName string `yaml:"node_name"`
RandomizeNodeName bool `yaml:"randomize_node_name"`
StreamTimeout time.Duration `yaml:"stream_timeout"`
RetransmitMult int `yaml:"retransmit_factor"`
PushPullInterval time.Duration `yaml:"pull_push_interval"`
GossipInterval time.Duration `yaml:"gossip_interval"`
GossipNodes int `yaml:"gossip_nodes"`
GossipToTheDeadTime time.Duration `yaml:"gossip_to_dead_nodes_time"`
DeadNodeReclaimTime time.Duration `yaml:"dead_node_reclaim_time"`
EnableCompression bool `yaml:"compression_enabled"`
NodeName string `yaml:"node_name" category:"advanced"`
RandomizeNodeName bool `yaml:"randomize_node_name" category:"advanced"`
StreamTimeout time.Duration `yaml:"stream_timeout" category:"advanced"`
RetransmitMult int `yaml:"retransmit_factor" category:"advanced"`
PushPullInterval time.Duration `yaml:"pull_push_interval" category:"advanced"`
GossipInterval time.Duration `yaml:"gossip_interval" category:"advanced"`
GossipNodes int `yaml:"gossip_nodes" category:"advanced"`
GossipToTheDeadTime time.Duration `yaml:"gossip_to_dead_nodes_time" category:"advanced"`
DeadNodeReclaimTime time.Duration `yaml:"dead_node_reclaim_time" category:"advanced"`
EnableCompression bool `yaml:"compression_enabled" category:"advanced"`

// ip:port to advertise other cluster members. Used for NAT traversal
AdvertiseAddr string `yaml:"advertise_addr"`
AdvertisePort int `yaml:"advertise_port"`

// List of members to join
JoinMembers flagext.StringSlice `yaml:"join_members"`
MinJoinBackoff time.Duration `yaml:"min_join_backoff"`
MaxJoinBackoff time.Duration `yaml:"max_join_backoff"`
MaxJoinRetries int `yaml:"max_join_retries"`
MinJoinBackoff time.Duration `yaml:"min_join_backoff" category:"advanced"`
MaxJoinBackoff time.Duration `yaml:"max_join_backoff" category:"advanced"`
MaxJoinRetries int `yaml:"max_join_retries" category:"advanced"`
AbortIfJoinFails bool `yaml:"abort_if_cluster_join_fails"`
RejoinInterval time.Duration `yaml:"rejoin_interval"`
RejoinInterval time.Duration `yaml:"rejoin_interval" category:"advanced"`

// Remove LEFT ingesters from ring after this timeout.
LeftIngestersTimeout time.Duration `yaml:"left_ingesters_timeout"`
LeftIngestersTimeout time.Duration `yaml:"left_ingesters_timeout" category:"advanced"`

// Timeout used when leaving the memberlist cluster.
LeaveTimeout time.Duration `yaml:"leave_timeout"`
LeaveTimeout time.Duration `yaml:"leave_timeout" category:"advanced"`

// How much space to use to keep received and sent messages in memory (for troubleshooting).
MessageHistoryBufferBytes int `yaml:"message_history_buffer_bytes"`
MessageHistoryBufferBytes int `yaml:"message_history_buffer_bytes" category:"advanced"`

TCPTransport TCPTransportConfig `yaml:",inline"`

Expand Down
4 changes: 2 additions & 2 deletions kv/memberlist/tcp_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ type TCPTransportConfig struct {

// Timeout used when making connections to other nodes to send packet.
// Zero = no timeout
PacketDialTimeout time.Duration `yaml:"packet_dial_timeout"`
PacketDialTimeout time.Duration `yaml:"packet_dial_timeout" category:"advanced"`

// Timeout for writing packet data. Zero = no timeout.
PacketWriteTimeout time.Duration `yaml:"packet_write_timeout"`
PacketWriteTimeout time.Duration `yaml:"packet_write_timeout" category:"advanced"`

// Transport logs lot of messages at debug level, so it deserves an extra flag for turning it on
TransportDebug bool `yaml:"-"`
Expand Down

0 comments on commit 6910e2b

Please sign in to comment.