Module: AgentClientProtocol
- Defined in:
- lib/agent_client_protocol.rb,
lib/agent_client_protocol/rpc.rb,
lib/agent_client_protocol/codec.rb,
lib/agent_client_protocol/error.rb,
lib/agent_client_protocol/types.rb,
lib/agent_client_protocol/decoder.rb,
lib/agent_client_protocol/methods.rb,
lib/agent_client_protocol/version.rb,
lib/agent_client_protocol/constants.rb,
lib/agent_client_protocol/validator.rb,
lib/agent_client_protocol/types/base.rb,
lib/agent_client_protocol/type_registry.rb,
lib/agent_client_protocol/schema_registry.rb,
lib/agent_client_protocol/protocol_version.rb
Defined Under Namespace
Modules: Constants, ErrorCode, Methods, RPC, Types
Classes: Codec, Decoder, Error, ProtocolVersion, SchemaRegistry, TypeRegistry, Validator
Constant Summary
collapse
- AGENT_METHOD_NAMES =
Methods.agent.freeze
- CLIENT_METHOD_NAMES =
Methods.client.freeze
- UNSTABLE_AGENT_METHOD_NAMES =
Methods.agent(unstable: true).freeze
- UNSTABLE_CLIENT_METHOD_NAMES =
Methods.client(unstable: true).freeze
- PROTOCOL_METHOD_NAMES =
Methods.protocol(unstable: true).freeze
- VERSION =
"0.1.0"
Class Method Summary
collapse
Class Method Details
.build_typed(definition_name, payload, unstable: false) ⇒ Object
30
31
32
|
# File 'lib/agent_client_protocol.rb', line 30
def build_typed(definition_name, payload, unstable: false)
TypeRegistry.build(definition_name, payload, unstable: unstable)
end
|
.codec(side:, unstable: false, validate_schema: true) ⇒ Object
38
39
40
|
# File 'lib/agent_client_protocol.rb', line 38
def codec(side:, unstable: false, validate_schema: true)
Codec.new(side: side, unstable: unstable, validate_schema: validate_schema)
end
|
.type_for(definition_name, unstable: false) ⇒ Object
26
27
28
|
# File 'lib/agent_client_protocol.rb', line 26
def type_for(definition_name, unstable: false)
TypeRegistry.fetch(definition_name, unstable: unstable)
end
|
.validate(definition_name, payload, unstable: false) ⇒ Object
34
35
36
|
# File 'lib/agent_client_protocol.rb', line 34
def validate(definition_name, payload, unstable: false)
Validator.validate(definition_name, payload, unstable: unstable)
end
|