Struct: endpoint-discovery.Endpoint
Overview
Endpoint represents an endpoint used in endpoint discovery.
Implemented Interfaces
types.AnalyticsFilter, v4.HTTPPresigner, s3.HTTPPresignerV4, types.MetricsFilter, s3.PresignPost, arn.S3ObjectLambdaARN, types.SelectObjectContentEventStream
Structure Field Summary collapse
Method Summary collapse
-
func (e *Endpoint) Add(addr WeightedAddress)
Add will add a given WeightedAddress to the address list of Endpoint.
-
func (e *Endpoint) GetValidAddress() (WeightedAddress, bool)
GetValidAddress will return a non-expired weight endpoint.
-
func (e *Endpoint) Len() int
Len returns the number of valid endpoints where valid means the endpoint has not expired.
-
func (e *Endpoint) Prune() bool
Prune will prune the expired addresses from the endpoint by allocating a new []WeightAddress.
Structure Field Details
Addresses WeightedAddresses
Key string
Method Details
func (e *Endpoint) Add(addr WeightedAddress)
Add will add a given WeightedAddress to the address list of Endpoint.
29 30 31 |
// File 'service/internal/endpoint-discovery/endpoint.go', line 29
|
func (e *Endpoint) GetValidAddress() (WeightedAddress, bool)
GetValidAddress will return a non-expired weight endpoint
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
// File 'service/internal/endpoint-discovery/endpoint.go', line 48
|
func (e *Endpoint) Len() int
Len returns the number of valid endpoints where valid means the endpoint has not expired.
35 36 37 38 39 40 41 42 43 44 45 |
// File 'service/internal/endpoint-discovery/endpoint.go', line 35
|
func (e *Endpoint) Prune() bool
Prune will prune the expired addresses from the endpoint by allocating a new []WeightAddress. This is not concurrent safe, and should be called from a single owning thread.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
// File 'service/internal/endpoint-discovery/endpoint.go', line 66
|