Selaa lähdekoodia

Change name to listenbuffer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)

Michael Crosby 11 vuotta sitten
vanhempi
commit
d5e41c1cb6
2 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 2 2
      api/api.go
  2. 3 3
      pkg/listenbuffer/buffer.go

+ 2 - 2
api/api.go

@@ -10,7 +10,7 @@ import (
 	"fmt"
 	"fmt"
 	"github.com/dotcloud/docker/auth"
 	"github.com/dotcloud/docker/auth"
 	"github.com/dotcloud/docker/engine"
 	"github.com/dotcloud/docker/engine"
-	"github.com/dotcloud/docker/pkg/socketactivation"
+	"github.com/dotcloud/docker/pkg/listenbuffer"
 	"github.com/dotcloud/docker/pkg/systemd"
 	"github.com/dotcloud/docker/pkg/systemd"
 	"github.com/dotcloud/docker/utils"
 	"github.com/dotcloud/docker/utils"
 	"github.com/gorilla/mux"
 	"github.com/gorilla/mux"
@@ -1163,7 +1163,7 @@ func ListenAndServe(proto, addr string, eng *engine.Engine, logging, enableCors
 		}
 		}
 	}
 	}
 
 
-	l, err := socketactivation.NewActivationListener(proto, addr, activationLock, 15*time.Minute)
+	l, err := listenbuffer.NewListenBuffer(proto, addr, activationLock, 15*time.Minute)
 	if err != nil {
 	if err != nil {
 		return err
 		return err
 	}
 	}

+ 3 - 3
pkg/socketactivation/activation.go → pkg/listenbuffer/buffer.go

@@ -3,7 +3,7 @@
    listening on a socket, unix, tcp, udp but hold connections
    listening on a socket, unix, tcp, udp but hold connections
    until the application has booted and is ready to accept them
    until the application has booted and is ready to accept them
 */
 */
-package socketactivation
+package listenbuffer
 
 
 import (
 import (
 	"fmt"
 	"fmt"
@@ -11,9 +11,9 @@ import (
 	"time"
 	"time"
 )
 )
 
 
-// NewActivationListener returns a listener listening on addr with the protocol.  It sets the
+// NewListenBuffer returns a listener listening on addr with the protocol.  It sets the
 // timeout to wait on first connection before an error is returned
 // timeout to wait on first connection before an error is returned
-func NewActivationListener(proto, addr string, activate chan struct{}, timeout time.Duration) (net.Listener, error) {
+func NewListenBuffer(proto, addr string, activate chan struct{}, timeout time.Duration) (net.Listener, error) {
 	wrapped, err := net.Listen(proto, addr)
 	wrapped, err := net.Listen(proto, addr)
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err