Class CosIdEndpoint
java.lang.Object
me.ahoo.cosid.spring.autoconfigure.CosIdEndpoint
The read-only
cosid Actuator endpoint (07 ยง4.2, D17), replacing the 4.x cosid,
cosidGenerator and cosidStringGenerator endpoints:
GET /actuator/cosid: every generator (CosIdRuntime.describe());GET /actuator/cosid/{name}: one generator;GET /actuator/cosid/{name}/long: alongid (snowflake,segmentandcustom);GET /actuator/cosid/{name}/string: a text id, through the generator's codec.
long of a text-only one, 400.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe JSON body of a generator:GeneratorInfo, which has no bean accessors for Jackson, as a record. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCosIdEndpoint(me.ahoo.cosid.runtime.CosIdRuntime runtime) Creates the endpoint. -
Method Summary
-
Field Details
-
ID
- See Also:
-
LONG
- See Also:
-
STRING
- See Also:
-
-
Constructor Details
-
CosIdEndpoint
public CosIdEndpoint(me.ahoo.cosid.runtime.CosIdRuntime runtime) Creates the endpoint.- Parameters:
runtime- the runtime it describes and generates from
-
-
Method Details
-
describe
Describes every generator.- Returns:
- the generators by name
-
generator
Describes one generator.- Parameters:
name- the generator name- Returns:
- the generator, or null for an unknown one
-
generate
Generates an id.- Parameters:
name- the generator nameformat-longorstring- Returns:
- the id, or null for an unknown generator
-