verprovider

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientVersionProvider

type ClientVersionProvider struct {
	// contains filtered or unexported fields
}

ClientVersionProvider implements client versions.

func New

func New(clientVersions []protocol.Version, opts ...Option) (*ClientVersionProvider, error)

New creates new client version provider.

func (*ClientVersionProvider) Current

func (c *ClientVersionProvider) Current() (protocol.Version, error)

Current returns the latest version of client.

func (*ClientVersionProvider) Get

func (c *ClientVersionProvider) Get(versionTime uint64) (protocol.Version, error)

Get gets client version based on version time.

type Option

type Option func(opts *ClientVersionProvider)

Option is an option for client.

func WithCurrentProtocolVersion

func WithCurrentProtocolVersion(version string) Option

WithCurrentProtocolVersion sets optional current client protocol version (defaults to last registered protocol).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL