mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-20 16:44:27 +01:00
v0.5.0-rc4: fixing autocert issue, cache ACME registration, added ls-config option
This commit is contained in:
@@ -40,7 +40,7 @@ func ConnectClient(host string) (Client, E.NestedError) {
|
||||
opt = clientOptEnvHost
|
||||
default:
|
||||
helper, err := E.Check(connhelper.GetConnectionHelper(host))
|
||||
if err.IsNotNil() {
|
||||
if err.HasError() {
|
||||
logger.Fatalf("unexpected error: %s", err)
|
||||
}
|
||||
if helper != nil {
|
||||
@@ -65,7 +65,7 @@ func ConnectClient(host string) (Client, E.NestedError) {
|
||||
|
||||
client, err := E.Check(client.NewClientWithOpts(opt...))
|
||||
|
||||
if err.IsNotNil() {
|
||||
if err.HasError() {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ type ClientInfo struct {
|
||||
|
||||
func GetClientInfo(clientHost string) (*ClientInfo, E.NestedError) {
|
||||
dockerClient, err := ConnectClient(clientHost)
|
||||
if err.IsNotNil() {
|
||||
if err.HasError() {
|
||||
return nil, E.Failure("create docker client").With(err)
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ func GetClientInfo(clientHost string) (*ClientInfo, E.NestedError) {
|
||||
defer cancel()
|
||||
|
||||
containers, err := E.Check(dockerClient.ContainerList(ctx, container.ListOptions{}))
|
||||
if err.IsNotNil() {
|
||||
if err.HasError() {
|
||||
return nil, E.Failure("list containers").With(err)
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ func GetClientInfo(clientHost string) (*ClientInfo, E.NestedError) {
|
||||
// since the services being proxied to
|
||||
// should have the same IP as the docker client
|
||||
url, err := E.Check(client.ParseHostURL(dockerClient.DaemonHost()))
|
||||
if err.IsNotNil() {
|
||||
if err.HasError() {
|
||||
return nil, E.Invalid("host url", dockerClient.DaemonHost()).With(err)
|
||||
}
|
||||
if url.Scheme == "unix" {
|
||||
|
||||
@@ -63,7 +63,7 @@ func ParseLabel(label string, value string) (*Label, E.NestedError) {
|
||||
}
|
||||
// try to parse value
|
||||
v, err := p(value)
|
||||
if err.IsNotNil() {
|
||||
if err.HasError() {
|
||||
return nil, err
|
||||
}
|
||||
l.Value = v
|
||||
|
||||
Reference in New Issue
Block a user