Options
All
  • Public
  • Public/Protected
  • All
Menu

A Host is one instance of the etcd server, which can contain multiple services. It holds GRPC clients to communicate with the host, and will be removed from the connection pool upon server failures.

Hierarchy

  • Host

Index

Constructors

constructor

  • new Host(host: string, channelCredentials: ChannelCredentials, channelOptions?: ChannelOptions, faultHandling?: IPolicy<IDefaultPolicyContext>): Host
  • Parameters

    • host: string
    • channelCredentials: ChannelCredentials
    • Optional channelOptions: ChannelOptions
    • Default value faultHandling: IPolicy<IDefaultPolicyContext> = defaultCircuitBreaker()

    Returns Host

Properties

Readonly faultHandling

faultHandling: IPolicy<IDefaultPolicyContext>

Methods

close

  • close(): void
  • Close frees resources associated with the host, tearing down any existing client

    Returns void

getServiceClient

  • getServiceClient(name: keyof typeof Services): Client
  • Returns the given GRPC service on the current host.

    Parameters

    • name: keyof typeof Services

    Returns Client

resetAllServices

  • resetAllServices(): void
  • Closes the all clients for the given host, allowing them to be reestablished on subsequent calls.

    Returns void

Legend

  • Constructor
  • Method
  • Inherited method

Generated using TypeDoc