Merge "v23: Added server option for lame duck timeout"
diff --git a/options/.api b/options/.api
index fec4c48..05d88ab 100644
--- a/options/.api
+++ b/options/.api
@@ -1,6 +1,7 @@
 pkg options, method (ChannelTimeout) RPCCallOpt()
 pkg options, method (ChannelTimeout) RPCServerOpt()
 pkg options, method (IsLeaf) RPCServerOpt()
+pkg options, method (LameDuckTimeout) RPCServerOpt()
 pkg options, method (NameResolutionAuthorizer) NSOpt()
 pkg options, method (NameResolutionAuthorizer) RPCCallOpt()
 pkg options, method (NoRetry) NSOpt()
@@ -13,6 +14,7 @@
 pkg options, method (ServesMountTable) RPCServerOpt()
 pkg options, type ChannelTimeout time.Duration
 pkg options, type IsLeaf bool
+pkg options, type LameDuckTimeout time.Duration
 pkg options, type NameResolutionAuthorizer struct
 pkg options, type NameResolutionAuthorizer struct, embedded security.Authorizer
 pkg options, type NoRetry struct
diff --git a/options/options.go b/options/options.go
index fcee51a..be8219d 100644
--- a/options/options.go
+++ b/options/options.go
@@ -120,6 +120,11 @@
 
 func (ServesMountTable) RPCServerOpt() {}
 
+// LameDuckTimeout specifies the time to wait for all server operations to complete after Stop is called.
+type LameDuckTimeout time.Duration
+
+func (LameDuckTimeout) RPCServerOpt() {}
+
 // Create a server that will be used to serve a leaf service.
 type IsLeaf bool