nodeidapi

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

README

nodeid-service

Documentation

Index

Constants

View Source
const (
	NodeidServiceHTTP clientutil.ServiceName = "nodeid-service-http"
	NodeidServiceGRPC clientutil.ServiceName = "nodeid-service-grpc"
)
View Source
const (
	DefaultRetryDelay        = 10 * time.Millisecond
	DefaultHeartbeatInterval = 30 * time.Second
)

Variables

This section is empty.

Functions

func NewGRPCClient

func NewGRPCClient(serviceAPIManager clientutil.ServiceAPIManager, rewriteServiceName ...clientutil.ServiceName) (nodeidservicev1.SrvNodeIDV1Client, error)

NewGRPCClient ...

func NewHTTPClient

func NewHTTPClient(serviceAPIManager clientutil.ServiceAPIManager, rewriteServiceName ...clientutil.ServiceName) (nodeidservicev1.SrvNodeIDV1HTTPClient, error)

NewHTTPClient ...

Types

type Option

type Option func(*options)

func WithHeartbeatInterval

func WithHeartbeatInterval(duration time.Duration) Option

func WithLogger

func WithLogger(logger log.Logger) Option

func WithRetryDelay

func WithRetryDelay(delay time.Duration) Option

func WithTries

func WithTries(tries int) Option

type RenewalManager

type RenewalManager interface {
	Stop(ctx context.Context) error
	RenewalResult(ctx context.Context) *RenewalResult
}

type RenewalResult

type RenewalResult struct {
	Data     *nodeidresourcev1.RenewalNodeIdRespData
	Err      error
	LastTime time.Time
}

Jump to

Keyboard shortcuts

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