# Module cloudi_service_name

- Description
- Function Index
- Function Details

### CloudI Service Name Creation and Parsing

.

Copyright © 2014-2021 Michael Truog

Version: 2.0.3 Dec 3 2021 17:15:32 ------------------------------------------------------------------------

Authors: Michael Truog (`mjtruog at protonmail dot com`).

## Description

### CloudI Service Name Creation and Parsing

## Function Index

new/2 | #### Transform a service name pattern with parameters into an exact service name. The pattern input can contain consecutive * wildcard characters because they are only used for a template.
new/4 | #### Transform a service name pattern with parameters into an exact service name. The pattern input can contain consecutive * wildcard characters because they are only used for a template.
parse/2 | #### Parse a service name pattern to return parameters. .
parse_with_suffix/2 | #### Parse a service name pattern and return the common suffix. .
pattern/1 | #### Determine if a service name pattern contains wildcard characters. If not, the service name pattern would only be used with a service name that is an exact match.
suffix/2 | #### Provide the suffix of the service name or service pattern based on the service's configured prefix. .
utf8/1 | #### Convert the service name or service pattern type for interpretation as UTF8. Used for io formatting with ~ts.
utf8_forced/1 | #### Force conversion of the service name or service pattern type for interpretation as UTF8. Used for io formatting with ~ts.

## Function Details

### new/2

`new(Pattern::cloudi:bytestring(), Parameters::[cloudi:bytestring()]) -> {ok, cloudi:bytestring()} | {error, parameters_ignored | parameter_missing}`

#### Transform a service name pattern with parameters into an exact service name.

The pattern input can contain consecutive * wildcard characters because they are only used for a template.

### new/4

`new(Pattern::cloudi:bytestring(), Parameters::[cloudi:bytestring()], ParametersSelected::[pos_integer()], ParametersStrictMatching::boolean()) -> {ok, cloudi:bytestring()} | {error, parameters_ignored | parameter_missing | parameters_selected_empty | {parameters_selected_ignored, [pos_integer()]} | {parameters_selected_missing, pos_integer()}}`

#### Transform a service name pattern with parameters into an exact service name.

The pattern input can contain consecutive * wildcard characters because they are only used for a template.

### parse/2

`parse(Name::cloudi:bytestring(), Pattern::cloudi:bytestring()) -> [cloudi:nonempty_bytestring()] | error`

#### Parse a service name pattern to return parameters.

### parse_with_suffix/2

`parse_with_suffix(Name::cloudi:bytestring(), Pattern::cloudi:bytestring()) -> {[cloudi:nonempty_bytestring()], cloudi:bytestring()} | error`

#### Parse a service name pattern and return the common suffix.

### pattern/1

`pattern(Pattern::cloudi:bytestring()) -> boolean()`

#### Determine if a service name pattern contains wildcard characters.

If not, the service name pattern would only be used with a service name that is an exact match.

### suffix/2

`suffix(Prefix::cloudi:nonempty_bytestring(), NameOrPattern::cloudi:nonempty_bytestring()) -> cloudi:bytestring()`

#### Provide the suffix of the service name or service pattern based on the service's configured prefix.

### utf8/1

`utf8(NameOrPattern::cloudi:nonempty_bytestring()) -> <<_:_*8>>`

#### Convert the service name or service pattern type for interpretation as UTF8.

Used for io formatting with ~ts.

### utf8_forced/1

`utf8_forced(NameOrPattern::cloudi:nonempty_bytestring()) -> <<_:_*8>>`

#### Force conversion of the service name or service pattern type for interpretation as UTF8.

Used for io formatting with ~ts.

Generated by EDoc