Documentation ¶
Index ¶
- Constants
- func StaticLoad(p string, d []byte) func() []byte
- func StaticLoadTempl(p string, d *template.Template) func() *template.Template
- type File
- type S
- func (s *S) AddCert(certFile, keyFile string) error
- func (s *S) AddFile(h, p, r string, static *Static) error
- func (s *S) AddHandler(h, p, t string, f http.Handler)
- func (s *S) AddRedirect(h, p, to string, _ *Static) error
- func (s *S) AddReverse(h, p, to string, static *Static) error
- func (s *S) Serve(a, chalenge string)
- func (s *S) ServeTLS(a string)
- type Static
Constants ¶
View Source
const StaticUpdate time.Duration = time.Second * 10
The min duration between to check of static file
Variables ¶
This section is empty.
Functions ¶
func StaticLoad ¶
Return a function never nil that return the content of the file p or the default content if error or p is empty.
Types ¶
type S ¶
One serve.
func (*S) AddHandler ¶
Add a hanlder for the host h, and with the path p. t is the name type of the handlern, it uses by the logger.
func (*S) AddRedirect ¶
Add a retirect handler for the destination to.
func (*S) AddReverse ¶
Add a reverso proxy to the host
Click to show internal directories.
Click to hide internal directories.