Documentation ¶
Index ¶
- Constants
- func NewGRPCClient(serviceAPIManager clientutil.ServiceAPIManager, ...) (nodeidservicev1.SrvNodeIDV1Client, error)
- func NewHTTPClient(serviceAPIManager clientutil.ServiceAPIManager, ...) (nodeidservicev1.SrvNodeIDV1HTTPClient, error)
- type NodeIDAPI
- type NodeIDHelper
- type Option
- type RenewalManager
- type RenewalResult
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 NodeIDAPI ¶
type NodeIDAPI interface { GetServiceInfo(ctx context.Context) (*nodeidresourcev1.GetServiceInfoRespData, error) GetNodeId(context.Context, *nodeidresourcev1.GetNodeIdReq) (*nodeidresourcev1.GetNodeIdRespData, error) ReleaseNodeId(context.Context, *nodeidresourcev1.ReleaseNodeIdReq) (*nodeidresourcev1.ReleaseNodeIdRespData, error) RenewalNodeId(context.Context, *nodeidresourcev1.RenewalNodeIdReq) (*nodeidresourcev1.RenewalNodeIdRespData, error) }
func NewGRPCApi ¶
func NewGRPCApi(client nodeidservicev1.SrvNodeIDV1Client) NodeIDAPI
func NewHTTPApi ¶
func NewHTTPApi(client nodeidservicev1.SrvNodeIDV1HTTPClient) NodeIDAPI
type NodeIDHelper ¶
type NodeIDHelper interface { GetAndAutoRenewalNodeID(ctx context.Context, req *nodeidresourcev1.GetNodeIdReq) (*nodeidresourcev1.GetNodeIdRespData, RenewalManager, error) GetNodeID(ctx context.Context, req *nodeidresourcev1.GetNodeIdReq) (*nodeidresourcev1.GetNodeIdRespData, error) RenewalNodeID(ctx context.Context, dataModel *nodeidresourcev1.GetNodeIdRespData) (RenewalManager, error) ReleaseNodeId(ctx context.Context, dataModel *nodeidresourcev1.GetNodeIdRespData) (*nodeidresourcev1.ReleaseNodeIdRespData, error) GetServiceInfo(ctx context.Context) (*nodeidresourcev1.GetServiceInfoRespData, error) }
func NewNodeIDHelper ¶
func NewNodeIDHelper(client NodeIDAPI, opts ...Option) (NodeIDHelper, error)
type Option ¶
type Option func(*options)
func WithHeartbeatInterval ¶
func WithLogger ¶
func WithRetryDelay ¶
type RenewalManager ¶
type RenewalResult ¶
type RenewalResult struct { Data *nodeidresourcev1.RenewalNodeIdRespData Err error LastTime time.Time }
Click to show internal directories.
Click to hide internal directories.