SDK
SDK Golang v2.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

Now #

Returns the current server timestamp, in Epoch-millis format.

Arguments #

func (s *Server) Now(options types.QueryOptions) (int64, error)
ArgumentsTypeDescription
options
types.QueryOptions
Query options.

Options #

Additional query options

OptionTypeDescriptionDefault
Queuable
bool
If true, queues the request during downtime, until connected to Kuzzle againtrue

Return #

Returns current server timestamp as int64 or a KuzzleError. See how to handle error.

Usage #

ts, err := kuzzle.Server.Now(nil)
if err != nil {
  log.Fatal(err)
} else {
  fmt.Println("Epoch-millis timestamp:", ts)
}