Documentation ¶
Index ¶
- Variables
- type Config
- type Svc
- func (s *Svc) Add(ctx context.Context, pid apiproject.ProjectID, name, spec string) error
- func (s *Svc) Bind(ctx context.Context, req *pb.BindRequest) (*pb.BindResponse, error)
- func (s *Svc) Register(ctx context.Context, srv *grpc.Server, gw *runtime.ServeMux)
- func (s *Svc) Start()
- func (s *Svc) Tick(context.Context, *pb.TickRequest) (*pb.TickResponse, error)
- func (s *Svc) Unbind(ctx context.Context, req *pb.UnbindRequest) (*pb.UnbindResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidCronspec = errors.New("invalid cronspec")
View Source
var EventTypes = []string{"tick"}
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { EventSourceID apieventsrc.EventSourceID `envconfig:"EVENT_SOURCE_ID" json:"event_source_id"` // This might be wanted off in real deployment - trigger can be done by external HTTP source // so only one cron svc will be active at any given tick. If this is != 0, all instances // will try to schedule which might trigger unwanted redundant ticks. LocalTickInterval time.Duration `envconfig:"LOCAL_TICK_INTERVAL" default:"1m" json:"local_tick_interval"` LocalTickIntervalOffsetRand bool `envconfig:"LOCAL_TICK_INTERVAL_RAND_OFFSET" default:"true" json:"local_tick_interval_rand_offset"` }
type Svc ¶
type Svc struct { pb.UnimplementedCronEventSourceServer Config Config StateStore kvstore.Store Events *events.Events EventSources eventsrcsstore.Store L L.Nullable }
func (*Svc) Bind ¶
func (s *Svc) Bind(ctx context.Context, req *pb.BindRequest) (*pb.BindResponse, error)
func (*Svc) Tick ¶
func (s *Svc) Tick(context.Context, *pb.TickRequest) (*pb.TickResponse, error)
func (*Svc) Unbind ¶
func (s *Svc) Unbind(ctx context.Context, req *pb.UnbindRequest) (*pb.UnbindResponse, error)
Click to show internal directories.
Click to hide internal directories.