Ports and Port Types

Operators use both input ports (“in” ports) and output ports (“out” ports) as interfaces to communicate between operators in a graph.

Port Definition

A port definition includes the elements described in the following table.

Element

Description

Purpose

In port or out port.

Name

Unique string that consists of alphanumeric characters only.

Type

String with a defined structure. The structure includes a mandatory base type and an optional semantic type.

Semantic Type

The semantic type can have a hierarchical substructure, separated with periods, and an optional wildcard at the end. The semantic type has the following format: <base type>.<semantic type>.
The following example shows two general port type specifications. The first example is an incomplete port type because it includes a wildcard:

Base Port Types

All port types fall into one of the built-in base port types. You can use the semantics of the type specification to enrich types with additional information, which the type owner can use. However, the application doesn't evaluate beyond the compatibility checks.

The following table describes each built-in base type, including a compatible indication. The Array column indicates whether the base type can use arrays. For example, []float64 can use arrays, but not []message.

Type

Description

Is compatible with type "any"

Array

any

generic type

yes

no

string

character sequence

yes

yes

blob

binary large object

yes

yes

int64

8-byte signed integer

yes

yes

float64

8-byte decimal number

yes

yes

byte

single character

yes

yes

message

structure with header and body

no

no

stream

unstructured data stream

no

no