Module: Temporalio::Client::Plugin

Included in:
SimplePlugin
Defined in:
lib/temporalio/client/plugin.rb

Overview

Plugin mixin to include for configuring clients and/or intercepting connect calls.

This is a low-level implementation that requires abstract methods herein to be implemented. Many implementers may prefer SimplePlugin which includes this.

WARNING: Plugins are experimental.

Instance Method Summary collapse

Instance Method Details

#configure_client(options) ⇒ Options

This method is abstract.

Configure a client.

Parameters:

  • options (Options)

    Current immutable options set.

Returns:

  • (Options)

    Options to use, possibly updated from original.

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/temporalio/client/plugin.rb', line 23

def configure_client(options)
  raise NotImplementedError
end

#connect_client(options, next_call) ⇒ Connection

This method is abstract.

Connect a client.

Implementers are expected to delegate to next_call to perform the connection. Note, this does not apply to users explicitly creating connections via Connection constructor.

Parameters:

  • options (Connection::Options)

    Current immutable options set.

  • next_call (Proc)

    Proc for the next plugin in the chain to call. It accepts the options and returns a Connection.

Returns:

Raises:

  • (NotImplementedError)


37
38
39
# File 'lib/temporalio/client/plugin.rb', line 37

def connect_client(options, next_call)
  raise NotImplementedError
end

#nameString

This method is abstract.

Returns Name of the plugin.

Returns:

  • (String)

    Name of the plugin.

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/temporalio/client/plugin.rb', line 14

def name
  raise NotImplementedError
end