Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
Expose frontend host:port (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
cretz authored Nov 15, 2021
1 parent 1cccf14 commit 1ecb757
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ func (s *Server) NewClientWithOptions(ctx context.Context, options client.Option
return client.NewClient(options)
}

// FrontendHostPort returns the host:port for this server.
//
// When constructing a Temporalite client from within the same process,
// NewClient or NewClientWithOptions should be used instead.
func (s *Server) FrontendHostPort() string {
return s.frontendHostPort
}

func timeoutFromContext(ctx context.Context, defaultTimeout time.Duration) time.Duration {
if deadline, ok := ctx.Deadline(); ok {
return deadline.Sub(time.Now())
Expand Down

0 comments on commit 1ecb757

Please sign in to comment.