Skip to content

[etcd/client/v3/lease.go] nextKeepAlive variable - make divide by 3 (now hardcoded) configurable #20640

@angroszew

Description

@angroszew

What would you like to be added?

Now, divider in nextKeepAlive := time.Now().Add((time.Duration(karesp.TTL) * time.Second) / 3.0) is hardcoded as 3.0
Is it possible to make it configurable?

Why is this needed?

We are using etcd package in a client to etcd db. We need to have possibility to configure when nextKeepAlive is sent by configuring nextKeepAlive divider (now it is hardcoded to 3.0). We have TTL set to 15secs (for example) and we need to cover edge scenarios when there is a need to refresh lease more often than every 5 seconds.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions