Paramaterize stickyMaxAgeMinutes for service in API

This commit is contained in:
m1093782566
2017-08-02 00:09:37 +08:00
parent 41aeccd088
commit c355a2ac96
16 changed files with 349 additions and 69 deletions

View File

@@ -28,7 +28,7 @@ type LoadBalancer interface {
// NextEndpoint returns the endpoint to handle a request for the given
// service-port and source address.
NextEndpoint(service proxy.ServicePortName, srcAddr net.Addr, sessionAffinityReset bool) (string, error)
NewService(service proxy.ServicePortName, sessionAffinityType api.ServiceAffinity, stickyMaxAgeMinutes int) error
NewService(service proxy.ServicePortName, sessionAffinityType api.ServiceAffinity, stickyMaxAgeSeconds int) error
DeleteService(service proxy.ServicePortName)
CleanupStaleStickySessions(service proxy.ServicePortName)
ServiceHasEndpoints(service proxy.ServicePortName) bool