mirror of
https://github.com/sablierapp/sablier.git
synced 2025-12-21 21:33:06 +01:00
* feat: add blocking refresh frequency The refresh frequency when using the blocking strategy was set to 5 seconds. This is now configurable with a default value of 5 seconds. * fail ci if codecov fail * always upload codecov even if ci fails * remove useless panic * use fork * add -short - revert later * remove short * publish test results
27 lines
941 B
Go
27 lines
941 B
Go
package api
|
|
|
|
import (
|
|
"context"
|
|
"github.com/sablierapp/sablier/pkg/config"
|
|
"github.com/sablierapp/sablier/pkg/sablier"
|
|
"github.com/sablierapp/sablier/pkg/theme"
|
|
"time"
|
|
)
|
|
|
|
//go:generate go tool mockgen -package apitest -source=api.go -destination=apitest/mocks_sablier.go *
|
|
|
|
type Sablier interface {
|
|
RequestSession(ctx context.Context, names []string, duration time.Duration) (*sablier.SessionState, error)
|
|
RequestSessionGroup(ctx context.Context, group string, duration time.Duration) (*sablier.SessionState, error)
|
|
RequestReadySession(ctx context.Context, names []string, duration time.Duration, timeout time.Duration) (*sablier.SessionState, error)
|
|
RequestReadySessionGroup(ctx context.Context, group string, duration time.Duration, timeout time.Duration) (*sablier.SessionState, error)
|
|
}
|
|
|
|
type ServeStrategy struct {
|
|
Theme *theme.Themes
|
|
|
|
Sablier Sablier
|
|
StrategyConfig config.Strategy
|
|
SessionsConfig config.Sessions
|
|
}
|