Menu

#13 SDK: Go client for microservice and cloud-native platforms

open
nobody
2026-04-24
2026-04-24
Anonymous
No

Originally created by: sentinel-safety

Context

SENTINEL currently ships Python and Node.js SDKs. Many platforms and microservices that serve minors are built in Go — gaming backends, real-time chat servers, and cloud-native APIs commonly use Go for performance reasons. A Go SDK would open SENTINEL to this ecosystem directly.

Requirements

The Go SDK should implement the same core interface as the Node.js SDK:

client := sentinel.NewClient(sentinel.Config{
    APIKey:  "your_key",
    BaseURL: "http://localhost:8080",
})

result, err := client.Events.Ingest(ctx, sentinel.Event{
    PlatformUserID: "user_84721",
    RecipientID:    "user_10392",
    ChannelType:    "direct_message",
    Timestamp:      time.Now(),
    MessageLength:  142,
})

fmt.Println(result.RiskScore)   // 87
fmt.Println(result.Tier)        // "critical"
fmt.Println(result.Explanation) // plain-language behavioral signals

Required features:

  • HTTP client with configurable timeout and retry (exponential backoff, 3 attempts)
    • Context support for cancellation and deadlines
      • Proper error types (distinguishing API errors from network errors)
        • go get github.com/sentinel-safety/sentinel-go packaging

Reference

See sdk/node/ for the Node.js implementation and docs/ for the API schema.

Skill level

Good starting point for a Go developer familiar with HTTP clients (net/http or resty). No ML required. Tests can use httptest for server mocking.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB