mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #18685 from calavera/remove_timeutils
Move timeutils functions to the only places where they are used.
This commit is contained in:
commit
52fd30079a
15 changed files with 44 additions and 50 deletions
|
@ -6,8 +6,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/docker/api/types"
|
"github.com/docker/docker/api/types"
|
||||||
|
timetypes "github.com/docker/docker/api/types/time"
|
||||||
"github.com/docker/docker/pkg/parsers/filters"
|
"github.com/docker/docker/pkg/parsers/filters"
|
||||||
"github.com/docker/docker/pkg/timeutils"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Events returns a stream of events in the daemon in a ReadCloser.
|
// Events returns a stream of events in the daemon in a ReadCloser.
|
||||||
|
@ -17,14 +17,14 @@ func (cli *Client) Events(options types.EventsOptions) (io.ReadCloser, error) {
|
||||||
ref := time.Now()
|
ref := time.Now()
|
||||||
|
|
||||||
if options.Since != "" {
|
if options.Since != "" {
|
||||||
ts, err := timeutils.GetTimestamp(options.Since, ref)
|
ts, err := timetypes.GetTimestamp(options.Since, ref)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
query.Set("since", ts)
|
query.Set("since", ts)
|
||||||
}
|
}
|
||||||
if options.Until != "" {
|
if options.Until != "" {
|
||||||
ts, err := timeutils.GetTimestamp(options.Until, ref)
|
ts, err := timetypes.GetTimestamp(options.Until, ref)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/docker/api/types"
|
"github.com/docker/docker/api/types"
|
||||||
"github.com/docker/docker/pkg/timeutils"
|
timetypes "github.com/docker/docker/api/types/time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ContainerLogs returns the logs generated by a container in an io.ReadCloser.
|
// ContainerLogs returns the logs generated by a container in an io.ReadCloser.
|
||||||
|
@ -22,7 +22,7 @@ func (cli *Client) ContainerLogs(options types.ContainerLogsOptions) (io.ReadClo
|
||||||
}
|
}
|
||||||
|
|
||||||
if options.Since != "" {
|
if options.Since != "" {
|
||||||
ts, err := timeutils.GetTimestamp(options.Since, time.Now())
|
ts, err := timetypes.GetTimestamp(options.Since, time.Now())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,11 +13,11 @@ import (
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/docker/distribution/registry/api/errcode"
|
||||||
"github.com/docker/docker/api/server/httputils"
|
"github.com/docker/docker/api/server/httputils"
|
||||||
"github.com/docker/docker/api/types"
|
"github.com/docker/docker/api/types"
|
||||||
|
timetypes "github.com/docker/docker/api/types/time"
|
||||||
"github.com/docker/docker/daemon"
|
"github.com/docker/docker/daemon"
|
||||||
derr "github.com/docker/docker/errors"
|
derr "github.com/docker/docker/errors"
|
||||||
"github.com/docker/docker/pkg/ioutils"
|
"github.com/docker/docker/pkg/ioutils"
|
||||||
"github.com/docker/docker/pkg/signal"
|
"github.com/docker/docker/pkg/signal"
|
||||||
"github.com/docker/docker/pkg/timeutils"
|
|
||||||
"github.com/docker/docker/runconfig"
|
"github.com/docker/docker/runconfig"
|
||||||
"github.com/docker/docker/utils"
|
"github.com/docker/docker/utils"
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
|
@ -101,7 +101,7 @@ func (s *containerRouter) getContainersLogs(ctx context.Context, w http.Response
|
||||||
|
|
||||||
var since time.Time
|
var since time.Time
|
||||||
if r.Form.Get("since") != "" {
|
if r.Form.Get("since") != "" {
|
||||||
s, n, err := timeutils.ParseTimestamps(r.Form.Get("since"), 0)
|
s, n, err := timetypes.ParseTimestamps(r.Form.Get("since"), 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,10 +9,10 @@ import (
|
||||||
"github.com/docker/docker/api"
|
"github.com/docker/docker/api"
|
||||||
"github.com/docker/docker/api/server/httputils"
|
"github.com/docker/docker/api/server/httputils"
|
||||||
"github.com/docker/docker/api/types"
|
"github.com/docker/docker/api/types"
|
||||||
|
timetypes "github.com/docker/docker/api/types/time"
|
||||||
"github.com/docker/docker/pkg/ioutils"
|
"github.com/docker/docker/pkg/ioutils"
|
||||||
"github.com/docker/docker/pkg/jsonmessage"
|
"github.com/docker/docker/pkg/jsonmessage"
|
||||||
"github.com/docker/docker/pkg/parsers/filters"
|
"github.com/docker/docker/pkg/parsers/filters"
|
||||||
"github.com/docker/docker/pkg/timeutils"
|
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -46,11 +46,11 @@ func (s *systemRouter) getEvents(ctx context.Context, w http.ResponseWriter, r *
|
||||||
if err := httputils.ParseForm(r); err != nil {
|
if err := httputils.ParseForm(r); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
since, sinceNano, err := timeutils.ParseTimestamps(r.Form.Get("since"), -1)
|
since, sinceNano, err := timetypes.ParseTimestamps(r.Form.Get("since"), -1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
until, untilNano, err := timeutils.ParseTimestamps(r.Form.Get("until"), -1)
|
until, untilNano, err := timetypes.ParseTimestamps(r.Form.Get("until"), -1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package timeutils
|
package time
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
|
@ -1,4 +1,4 @@
|
||||||
package timeutils
|
package time
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
|
@ -14,7 +14,6 @@ import (
|
||||||
"github.com/docker/docker/daemon/logger"
|
"github.com/docker/docker/daemon/logger"
|
||||||
"github.com/docker/docker/daemon/logger/loggerutils"
|
"github.com/docker/docker/daemon/logger/loggerutils"
|
||||||
"github.com/docker/docker/pkg/jsonlog"
|
"github.com/docker/docker/pkg/jsonlog"
|
||||||
"github.com/docker/docker/pkg/timeutils"
|
|
||||||
"github.com/docker/docker/pkg/units"
|
"github.com/docker/docker/pkg/units"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -87,8 +86,7 @@ func New(ctx logger.Context) (logger.Logger, error) {
|
||||||
|
|
||||||
// Log converts logger.Message to jsonlog.JSONLog and serializes it to file.
|
// Log converts logger.Message to jsonlog.JSONLog and serializes it to file.
|
||||||
func (l *JSONFileLogger) Log(msg *logger.Message) error {
|
func (l *JSONFileLogger) Log(msg *logger.Message) error {
|
||||||
|
timestamp, err := jsonlog.FastTimeMarshalJSON(msg.Timestamp)
|
||||||
timestamp, err := timeutils.FastMarshalJSON(msg.Timestamp)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/docker/pkg/timeutils"
|
"github.com/docker/docker/pkg/jsonlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ErrReadLogsNotSupported is returned when the logger does not support reading logs.
|
// ErrReadLogsNotSupported is returned when the logger does not support reading logs.
|
||||||
|
@ -19,7 +19,7 @@ var ErrReadLogsNotSupported = errors.New("configured logging reader does not sup
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// TimeFormat is the time format used for timestamps sent to log readers.
|
// TimeFormat is the time format used for timestamps sent to log readers.
|
||||||
TimeFormat = timeutils.RFC3339NanoFixed
|
TimeFormat = jsonlog.RFC3339NanoFixed
|
||||||
logWatcherBufferSize = 4096
|
logWatcherBufferSize = 4096
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,11 @@ import (
|
||||||
"github.com/docker/docker/daemon/logger"
|
"github.com/docker/docker/daemon/logger"
|
||||||
"github.com/docker/docker/dockerversion"
|
"github.com/docker/docker/dockerversion"
|
||||||
"github.com/docker/docker/opts"
|
"github.com/docker/docker/opts"
|
||||||
|
"github.com/docker/docker/pkg/jsonlog"
|
||||||
flag "github.com/docker/docker/pkg/mflag"
|
flag "github.com/docker/docker/pkg/mflag"
|
||||||
"github.com/docker/docker/pkg/pidfile"
|
"github.com/docker/docker/pkg/pidfile"
|
||||||
"github.com/docker/docker/pkg/signal"
|
"github.com/docker/docker/pkg/signal"
|
||||||
"github.com/docker/docker/pkg/system"
|
"github.com/docker/docker/pkg/system"
|
||||||
"github.com/docker/docker/pkg/timeutils"
|
|
||||||
"github.com/docker/docker/pkg/tlsconfig"
|
"github.com/docker/docker/pkg/tlsconfig"
|
||||||
"github.com/docker/docker/registry"
|
"github.com/docker/docker/registry"
|
||||||
"github.com/docker/docker/utils"
|
"github.com/docker/docker/utils"
|
||||||
|
@ -150,7 +150,7 @@ func (cli *DaemonCli) CmdDaemon(args ...string) error {
|
||||||
logrus.Warn("Running experimental build")
|
logrus.Warn("Running experimental build")
|
||||||
}
|
}
|
||||||
|
|
||||||
logrus.SetFormatter(&logrus.TextFormatter{TimestampFormat: timeutils.RFC3339NanoFixed})
|
logrus.SetFormatter(&logrus.TextFormatter{TimestampFormat: jsonlog.RFC3339NanoFixed})
|
||||||
|
|
||||||
if err := setDefaultUmask(); err != nil {
|
if err := setDefaultUmask(); err != nil {
|
||||||
logrus.Fatalf("Failed to set umask: %v", err)
|
logrus.Fatalf("Failed to set umask: %v", err)
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/docker/pkg/integration/checker"
|
"github.com/docker/docker/pkg/integration/checker"
|
||||||
"github.com/docker/docker/pkg/timeutils"
|
"github.com/docker/docker/pkg/jsonlog"
|
||||||
"github.com/go-check/check"
|
"github.com/go-check/check"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ func (s *DockerSuite) TestLogsTimestamps(c *check.C) {
|
||||||
|
|
||||||
for _, l := range lines {
|
for _, l := range lines {
|
||||||
if l != "" {
|
if l != "" {
|
||||||
_, err := time.Parse(timeutils.RFC3339NanoFixed+" ", ts.FindString(l))
|
_, err := time.Parse(jsonlog.RFC3339NanoFixed+" ", ts.FindString(l))
|
||||||
c.Assert(err, checker.IsNil, check.Commentf("Failed to parse timestamp from %v", l))
|
c.Assert(err, checker.IsNil, check.Commentf("Failed to parse timestamp from %v", l))
|
||||||
// ensure we have padded 0's
|
// ensure we have padded 0's
|
||||||
c.Assert(l[29], checker.Equals, uint8('Z'))
|
c.Assert(l[29], checker.Equals, uint8('Z'))
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
// "bytes"
|
// "bytes"
|
||||||
//-
|
//-
|
||||||
// "unicode/utf8"
|
// "unicode/utf8"
|
||||||
//+
|
|
||||||
//+ "github.com/docker/docker/pkg/timeutils"
|
|
||||||
// )
|
// )
|
||||||
//
|
//
|
||||||
// func (mj *JSONLog) MarshalJSON() ([]byte, error) {
|
// func (mj *JSONLog) MarshalJSON() ([]byte, error) {
|
||||||
|
@ -43,7 +41,7 @@
|
||||||
// }
|
// }
|
||||||
// buf.WriteString(`"time":`)
|
// buf.WriteString(`"time":`)
|
||||||
//- obj, err = mj.Created.MarshalJSON()
|
//- obj, err = mj.Created.MarshalJSON()
|
||||||
//+ timestamp, err = timeutils.FastMarshalJSON(mj.Created)
|
//+ timestamp, err = FastTimeMarshalJSON(mj.Created)
|
||||||
// if err != nil {
|
// if err != nil {
|
||||||
// return err
|
// return err
|
||||||
// }
|
// }
|
||||||
|
@ -69,8 +67,6 @@ package jsonlog
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
"github.com/docker/docker/pkg/timeutils"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// MarshalJSON marshals the JSONLog.
|
// MarshalJSON marshals the JSONLog.
|
||||||
|
@ -111,7 +107,7 @@ func (mj *JSONLog) MarshalJSONBuf(buf *bytes.Buffer) error {
|
||||||
buf.WriteString(`,`)
|
buf.WriteString(`,`)
|
||||||
}
|
}
|
||||||
buf.WriteString(`"time":`)
|
buf.WriteString(`"time":`)
|
||||||
timestamp, err = timeutils.FastMarshalJSON(mj.Created)
|
timestamp, err = FastTimeMarshalJSON(mj.Created)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Package timeutils provides helper functions to parse and print time (time.Time).
|
// Package jsonlog provides helper functions to parse and print time (time.Time) as JSON.
|
||||||
package timeutils
|
package jsonlog
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
@ -15,9 +15,9 @@ const (
|
||||||
JSONFormat = `"` + time.RFC3339Nano + `"`
|
JSONFormat = `"` + time.RFC3339Nano + `"`
|
||||||
)
|
)
|
||||||
|
|
||||||
// FastMarshalJSON avoids one of the extra allocations that
|
// FastTimeMarshalJSON avoids one of the extra allocations that
|
||||||
// time.MarshalJSON is making.
|
// time.MarshalJSON is making.
|
||||||
func FastMarshalJSON(t time.Time) (string, error) {
|
func FastTimeMarshalJSON(t time.Time) (string, error) {
|
||||||
if y := t.Year(); y < 0 || y >= 10000 {
|
if y := t.Year(); y < 0 || y >= 10000 {
|
||||||
// RFC 3339 is clear that years are 4 digits exactly.
|
// RFC 3339 is clear that years are 4 digits exactly.
|
||||||
// See golang.org/issue/4556#c15 for more discussion.
|
// See golang.org/issue/4556#c15 for more discussion.
|
|
@ -1,4 +1,4 @@
|
||||||
package timeutils
|
package jsonlog
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
@ -6,23 +6,23 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// Testing to ensure 'year' fields is between 0 and 9999
|
// Testing to ensure 'year' fields is between 0 and 9999
|
||||||
func TestFastMarshalJSONWithInvalidDate(t *testing.T) {
|
func TestFastTimeMarshalJSONWithInvalidDate(t *testing.T) {
|
||||||
aTime := time.Date(-1, 1, 1, 0, 0, 0, 0, time.Local)
|
aTime := time.Date(-1, 1, 1, 0, 0, 0, 0, time.Local)
|
||||||
json, err := FastMarshalJSON(aTime)
|
json, err := FastTimeMarshalJSON(aTime)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatalf("FastMarshalJSON should throw an error, but was '%v'", json)
|
t.Fatalf("FastTimeMarshalJSON should throw an error, but was '%v'", json)
|
||||||
}
|
}
|
||||||
anotherTime := time.Date(10000, 1, 1, 0, 0, 0, 0, time.Local)
|
anotherTime := time.Date(10000, 1, 1, 0, 0, 0, 0, time.Local)
|
||||||
json, err = FastMarshalJSON(anotherTime)
|
json, err = FastTimeMarshalJSON(anotherTime)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatalf("FastMarshalJSON should throw an error, but was '%v'", json)
|
t.Fatalf("FastTimeMarshalJSON should throw an error, but was '%v'", json)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestFastMarshalJSON(t *testing.T) {
|
func TestFastTimeMarshalJSON(t *testing.T) {
|
||||||
aTime := time.Date(2015, 5, 29, 11, 1, 2, 3, time.UTC)
|
aTime := time.Date(2015, 5, 29, 11, 1, 2, 3, time.UTC)
|
||||||
json, err := FastMarshalJSON(aTime)
|
json, err := FastTimeMarshalJSON(aTime)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ func TestFastMarshalJSON(t *testing.T) {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
aTime = time.Date(2015, 5, 29, 11, 1, 2, 3, location)
|
aTime = time.Date(2015, 5, 29, 11, 1, 2, 3, location)
|
||||||
json, err = FastMarshalJSON(aTime)
|
json, err = FastTimeMarshalJSON(aTime)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/docker/docker/pkg/jsonlog"
|
||||||
"github.com/docker/docker/pkg/term"
|
"github.com/docker/docker/pkg/term"
|
||||||
"github.com/docker/docker/pkg/timeutils"
|
|
||||||
"github.com/docker/docker/pkg/units"
|
"github.com/docker/docker/pkg/units"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -123,9 +123,9 @@ func (jm *JSONMessage) Display(out io.Writer, isTerminal bool) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if jm.TimeNano != 0 {
|
if jm.TimeNano != 0 {
|
||||||
fmt.Fprintf(out, "%s ", time.Unix(0, jm.TimeNano).Format(timeutils.RFC3339NanoFixed))
|
fmt.Fprintf(out, "%s ", time.Unix(0, jm.TimeNano).Format(jsonlog.RFC3339NanoFixed))
|
||||||
} else if jm.Time != 0 {
|
} else if jm.Time != 0 {
|
||||||
fmt.Fprintf(out, "%s ", time.Unix(jm.Time, 0).Format(timeutils.RFC3339NanoFixed))
|
fmt.Fprintf(out, "%s ", time.Unix(jm.Time, 0).Format(jsonlog.RFC3339NanoFixed))
|
||||||
}
|
}
|
||||||
if jm.ID != "" {
|
if jm.ID != "" {
|
||||||
fmt.Fprintf(out, "%s: ", jm.ID)
|
fmt.Fprintf(out, "%s: ", jm.ID)
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/docker/docker/pkg/jsonlog"
|
||||||
"github.com/docker/docker/pkg/term"
|
"github.com/docker/docker/pkg/term"
|
||||||
"github.com/docker/docker/pkg/timeutils"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestError(t *testing.T) {
|
func TestError(t *testing.T) {
|
||||||
|
@ -71,8 +71,8 @@ func TestJSONMessageDisplay(t *testing.T) {
|
||||||
From: "From",
|
From: "From",
|
||||||
Status: "status",
|
Status: "status",
|
||||||
}: {
|
}: {
|
||||||
fmt.Sprintf("%v ID: (from From) status\n", time.Unix(now.Unix(), 0).Format(timeutils.RFC3339NanoFixed)),
|
fmt.Sprintf("%v ID: (from From) status\n", time.Unix(now.Unix(), 0).Format(jsonlog.RFC3339NanoFixed)),
|
||||||
fmt.Sprintf("%v ID: (from From) status\n", time.Unix(now.Unix(), 0).Format(timeutils.RFC3339NanoFixed)),
|
fmt.Sprintf("%v ID: (from From) status\n", time.Unix(now.Unix(), 0).Format(jsonlog.RFC3339NanoFixed)),
|
||||||
},
|
},
|
||||||
// General, with nano precision time
|
// General, with nano precision time
|
||||||
JSONMessage{
|
JSONMessage{
|
||||||
|
@ -81,8 +81,8 @@ func TestJSONMessageDisplay(t *testing.T) {
|
||||||
From: "From",
|
From: "From",
|
||||||
Status: "status",
|
Status: "status",
|
||||||
}: {
|
}: {
|
||||||
fmt.Sprintf("%v ID: (from From) status\n", time.Unix(0, now.UnixNano()).Format(timeutils.RFC3339NanoFixed)),
|
fmt.Sprintf("%v ID: (from From) status\n", time.Unix(0, now.UnixNano()).Format(jsonlog.RFC3339NanoFixed)),
|
||||||
fmt.Sprintf("%v ID: (from From) status\n", time.Unix(0, now.UnixNano()).Format(timeutils.RFC3339NanoFixed)),
|
fmt.Sprintf("%v ID: (from From) status\n", time.Unix(0, now.UnixNano()).Format(jsonlog.RFC3339NanoFixed)),
|
||||||
},
|
},
|
||||||
// General, with both times Nano is preferred
|
// General, with both times Nano is preferred
|
||||||
JSONMessage{
|
JSONMessage{
|
||||||
|
@ -92,8 +92,8 @@ func TestJSONMessageDisplay(t *testing.T) {
|
||||||
From: "From",
|
From: "From",
|
||||||
Status: "status",
|
Status: "status",
|
||||||
}: {
|
}: {
|
||||||
fmt.Sprintf("%v ID: (from From) status\n", time.Unix(0, now.UnixNano()).Format(timeutils.RFC3339NanoFixed)),
|
fmt.Sprintf("%v ID: (from From) status\n", time.Unix(0, now.UnixNano()).Format(jsonlog.RFC3339NanoFixed)),
|
||||||
fmt.Sprintf("%v ID: (from From) status\n", time.Unix(0, now.UnixNano()).Format(timeutils.RFC3339NanoFixed)),
|
fmt.Sprintf("%v ID: (from From) status\n", time.Unix(0, now.UnixNano()).Format(jsonlog.RFC3339NanoFixed)),
|
||||||
},
|
},
|
||||||
// Stream over status
|
// Stream over status
|
||||||
JSONMessage{
|
JSONMessage{
|
||||||
|
|
Loading…
Add table
Reference in a new issue