Package dev.demeng.sentinel.client
Class SentinelClient
java.lang.Object
dev.demeng.sentinel.client.SentinelClient
Client for the Sentinel API.
Use builder() to create an instance. The client is thread-safe and should be reused
across requests. All license operations are accessed through licenses().
SentinelClient client = SentinelClient.builder()
.baseUrl("https://your-sentinel-instance.com")
.apiKey("your-api-key")
.build();
// Validation
ValidationResult result = client.licenses().validate(
ValidationRequest.builder()
.product("my-product")
.server("server-1")
.build());
// CRUD
License license = client.licenses().get("KEY-123");
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for constructingSentinelClientinstances. -
Method Summary
Modifier and TypeMethodDescriptionstatic SentinelClient.Builderbuilder()Creates a newSentinelClient.Builderfor constructing aSentinelClient.licenses()Returns the license operations facade.
-
Method Details
-
builder
Creates a newSentinelClient.Builderfor constructing aSentinelClient.- Returns:
- a new builder instance
-
licenses
Returns the license operations facade.- Returns:
- the license service
-