Documentation ¶
Index ¶
- Constants
- Variables
- func GetTaskArn() (string, error)
- func NewMiddleware(logger *zerolog.Logger, jwtManager jwt.JWTConsumer) []func(next http.Handler) http.Handler
- func NewMux(a *APIManager, middleware []func(next http.Handler) http.Handler) (http.Handler, error)
- func ProvideLogger(config config.Config) (*zerolog.Logger, error)
- func SetupAPIServer(lifecycle fx.Lifecycle, config config.Config, logger *zerolog.Logger, ...) error
- func SetupCheckpointManager(lifecycle fx.Lifecycle, checkpointManager checkpoint.CheckpointManager, ...) error
- func SetupNodeStateManager(lifecycle fx.Lifecycle, nodeStateManager sharder.NodeStateManager, ...) error
- func SetupOpenTelemetry(lifecycle fx.Lifecycle, config config.Config, logger *zerolog.Logger) error
- func SetupPprof(lifecycle fx.Lifecycle, logger *zerolog.Logger, config config.Config) error
- type APIManager
- type AWSTaskMetadata
- type ApiError
- type BadRequestError
- type CachedTenantConfig
- type InternalServerError
- type InvalidOptionError
- type NotFoundError
- type NotImplementedError
- type Response
- type Status
- type Tenant
- type TenantCache
- type Tracing
Constants ¶
View Source
const ( HeaderTraceId = "X-B3-TraceId" HeaderTenantId = "Application-Id" )
API header expected keys
View Source
const (
TENANT_CACHE_TTL_SECS = 30
)
Variables ¶
View Source
var WebsiteFS embed.FS
Functions ¶
func GetTaskArn ¶ added in v1.1.2
func NewMiddleware ¶
func ProvideLogger ¶ added in v0.2.0
func SetupAPIServer ¶
func SetupCheckpointManager ¶ added in v0.7.0
func SetupCheckpointManager(lifecycle fx.Lifecycle, checkpointManager checkpoint.CheckpointManager, config config.Config, logger *zerolog.Logger) error
func SetupNodeStateManager ¶ added in v0.7.0
func SetupOpenTelemetry ¶ added in v0.7.0
Types ¶
type APIManager ¶
func NewAPIManager ¶
func NewAPIManager(routingMgr tablemgr.RoutingTableManager, tenantStorer tenant.TenantStorer, quotaManager *quota.QuotaManager, jwtManager jwt.JWTConsumer, config config.Config) (*APIManager, error)
type AWSTaskMetadata ¶ added in v1.1.2
type AWSTaskMetadata struct {
TaskARN string
}
type BadRequestError ¶ added in v0.2.0
type BadRequestError struct {
// contains filtered or unexported fields
}
func (*BadRequestError) Error ¶ added in v0.2.0
func (e *BadRequestError) Error() string
func (*BadRequestError) StatusCode ¶ added in v0.2.0
func (e *BadRequestError) StatusCode() int
type CachedTenantConfig ¶ added in v1.1.0
type InternalServerError ¶ added in v0.2.0
type InternalServerError struct {
Wrapped error
}
func (*InternalServerError) Error ¶ added in v0.2.0
func (e *InternalServerError) Error() string
func (*InternalServerError) StatusCode ¶ added in v0.2.0
func (e *InternalServerError) StatusCode() int
type InvalidOptionError ¶
type InvalidOptionError struct {
Option string
}
InvalidOptionError is returned when an invalid option is passed in
func (*InvalidOptionError) Error ¶
func (e *InvalidOptionError) Error() string
type NotFoundError ¶ added in v0.2.0
type NotFoundError struct {
// contains filtered or unexported fields
}
func (*NotFoundError) Error ¶ added in v0.2.0
func (e *NotFoundError) Error() string
func (*NotFoundError) StatusCode ¶ added in v0.2.0
func (e *NotFoundError) StatusCode() int
type NotImplementedError ¶ added in v0.2.0
type NotImplementedError struct { }
func (*NotImplementedError) Error ¶ added in v0.2.0
func (e *NotImplementedError) Error() string
func (*NotImplementedError) StatusCode ¶ added in v0.2.0
func (e *NotImplementedError) StatusCode() int
type Response ¶
type Response struct { Status *Status `json:"status,omitempty" xml:"status,omitempty"` Tracing *Tracing `json:"tx,omitempty" xml:"tx,omitempty"` Item interface{} `json:"item,omitempty" xml:"item,omitempty"` Items interface{} `json:"items,omitempty" xml:"items,omitempty"` Data interface{} `json:"data,omitempty" xml:"data,omitempty"` }
func ErrorResponse ¶ added in v0.2.0
func ItemResponse ¶ added in v0.2.0
func ItemResponse(item interface{}) Response
func ItemsResponse ¶ added in v0.2.0
func ItemsResponse(item interface{}) Response
func SimpleResponse ¶ added in v0.2.0
type Tenant ¶ added in v0.2.0
type Tenant struct {
// contains filtered or unexported fields
}
func NewTenantId ¶ added in v0.2.0
type TenantCache ¶ added in v1.1.0
func NewTenantCache ¶ added in v1.1.0
func NewTenantCache(ttlSecs int) *TenantCache
func (*TenantCache) GetTenant ¶ added in v1.1.0
func (c *TenantCache) GetTenant(tenantId string) *tenant.Config
func (*TenantCache) SetTenant ¶ added in v1.1.0
func (c *TenantCache) SetTenant(tenantConfig *tenant.Config)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.