Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { ListenAddr string `defval:"0.0.0.0:8080"` // host:port ReadTimeout time.Duration `defval:"10m"` WriteTimeout time.Duration `defval:"10m"` Context context.Context }
func (*Config) WithOptions ¶
type GrpcServer ¶
type GrpcServer struct {
// contains filtered or unexported fields
}
func NewGrpcServer ¶
func NewGrpcServer() *GrpcServer
func (*GrpcServer) Run ¶
func (s *GrpcServer) Run(opts ...Option) error
func (*GrpcServer) Server ¶
func (s *GrpcServer) Server() *grpc.Server
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func NewHttpServer ¶
func NewHttpServer(handler http.Handler) *HttpServer
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithContext ¶
func WithListenAddr ¶
func WithReadTimeout ¶
func WithWriteTimeout ¶
type TaskServer ¶
type TaskServer struct {
// contains filtered or unexported fields
}
func NewTaskServer ¶
func NewTaskServer() *TaskServer
func (*TaskServer) AddCronFunc ¶
func (s *TaskServer) AddCronFunc(spec string, fn func()) error
func (*TaskServer) AddTimeAfterFunc ¶
func (*TaskServer) Run ¶
func (s *TaskServer) Run(opts ...Option) error
Click to show internal directories.
Click to hide internal directories.