func NewClient(service workflowserviceclient.Interface, domain string, options *Options) Client {
	return internal.NewClient(service, domain, options)
}
NewClient creates an instance of a workflow client
package client
import (
	"context"
	"go.uber.org/cadence/.gen/go/cadence/workflowserviceclient"
	s "go.uber.org/cadence/.gen/go/shared"
	"go.uber.org/cadence/encoded"
	"go.uber.org/cadence/internal"
	"go.uber.org/cadence/workflow"
)
const (
	QueryTypeStackTrace string = internal.QueryTypeStackTrace
	QueryTypeOpenSessions string = internal.QueryTypeOpenSessions
)
type (
	Options = internal.ClientOptions
	FeatureFlags = internal.FeatureFlags
	StartWorkflowOptions = internal.StartWorkflowOptions
	HistoryEventIterator = internal.HistoryEventIterator
	WorkflowRun = internal.WorkflowRun
	WorkflowIDReusePolicy = internal.WorkflowIDReusePolicy
	QueryWorkflowWithOptionsRequest = internal.QueryWorkflowWithOptionsRequest
	QueryWorkflowWithOptionsResponse = internal.QueryWorkflowWithOptionsResponse
	ParentClosePolicy = internal.ParentClosePolicy
	Client interface {
		StartWorkflow(ctx context.Context, options StartWorkflowOptions, workflowFunc interface{}, args ...interface{}) (*workflow.Execution, error)
		ExecuteWorkflow(ctx context.Context, options StartWorkflowOptions, workflow interface{}, args ...interface{}) (WorkflowRun, error)
		GetWorkflow(ctx context.Context, workflowID string, runID string) WorkflowRun
		SignalWorkflow(ctx context.Context, workflowID string, runID string, signalName string, arg interface{}) error
		SignalWithStartWorkflow(ctx context.Context, workflowID string, signalName string, signalArg interface{},
			options StartWorkflowOptions, workflowFunc interface{}, workflowArgs ...interface{}) (*workflow.Execution, error)
		CancelWorkflow(ctx context.Context, workflowID string, runID string) error
		TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, details []byte) error
		GetWorkflowHistory(ctx context.Context, workflowID string, runID string, isLongPoll bool, filterType s.HistoryEventFilterType) HistoryEventIterator
		CompleteActivity(ctx context.Context, taskToken []byte, result interface{}, err error) error
		CompleteActivityByID(ctx context.Context, domain, workflowID, runID, activityID string, result interface{}, err error) error
		RecordActivityHeartbeat(ctx context.Context, taskToken []byte, details ...interface{}) error
		RecordActivityHeartbeatByID(ctx context.Context, domain, workflowID, runID, activityID string, details ...interface{}) error
		ListClosedWorkflow(ctx context.Context, request *s.ListClosedWorkflowExecutionsRequest) (*s.ListClosedWorkflowExecutionsResponse, error)
		ListOpenWorkflow(ctx context.Context, request *s.ListOpenWorkflowExecutionsRequest) (*s.ListOpenWorkflowExecutionsResponse, error)
		ListWorkflow(ctx context.Context, request *s.ListWorkflowExecutionsRequest) (*s.ListWorkflowExecutionsResponse, error)
		ListArchivedWorkflow(ctx context.Context, request *s.ListArchivedWorkflowExecutionsRequest) (*s.ListArchivedWorkflowExecutionsResponse, error)
		ScanWorkflow(ctx context.Context, request *s.ListWorkflowExecutionsRequest) (*s.ListWorkflowExecutionsResponse, error)
		CountWorkflow(ctx context.Context, request *s.CountWorkflowExecutionsRequest) (*s.CountWorkflowExecutionsResponse, error)
		GetSearchAttributes(ctx context.Context) (*s.GetSearchAttributesResponse, error)
		QueryWorkflow(ctx context.Context, workflowID string, runID string, queryType string, args ...interface{}) (encoded.Value, error)
		QueryWorkflowWithOptions(ctx context.Context, request *QueryWorkflowWithOptionsRequest) (*QueryWorkflowWithOptionsResponse, error)
		ResetWorkflow(ctx context.Context, request *s.ResetWorkflowExecutionRequest) (*s.ResetWorkflowExecutionResponse, error)
		DescribeWorkflowExecution(ctx context.Context, workflowID, runID string) (*s.DescribeWorkflowExecutionResponse, error)
		DescribeTaskList(ctx context.Context, tasklist string, tasklistType s.TaskListType) (*s.DescribeTaskListResponse, error)
	}
	DomainClient interface {
		Register(ctx context.Context, request *s.RegisterDomainRequest) error
		Describe(ctx context.Context, name string) (*s.DescribeDomainResponse, error)
		Update(ctx context.Context, request *s.UpdateDomainRequest) error
	}
)
const (
	WorkflowIDReusePolicyAllowDuplicateFailedOnly WorkflowIDReusePolicy = internal.WorkflowIDReusePolicyAllowDuplicateFailedOnly
	WorkflowIDReusePolicyAllowDuplicate WorkflowIDReusePolicy = internal.WorkflowIDReusePolicyAllowDuplicate
	WorkflowIDReusePolicyRejectDuplicate WorkflowIDReusePolicy = internal.WorkflowIDReusePolicyRejectDuplicate
	WorkflowIDReusePolicyTerminateIfRunning = internal.WorkflowIDReusePolicyTerminateIfRunning
)
const (
	ParentClosePolicyTerminate = internal.ParentClosePolicyTerminate
	ParentClosePolicyRequestCancel = internal.ParentClosePolicyRequestCancel
	ParentClosePolicyAbandon = internal.ParentClosePolicyAbandon
)