Versions in this module Expand all Collapse all v2 v2.2.3 Jun 24, 2022 Changes in this version + const CertEntryType + const CommonServiceEntryType + const ConfigEntryType + const CryptoEntryType + const DocsEntryType + const EventEntryType + const LoggerEntryType + const PProfEntryType + const PromEntryType + const SWEntryType + const SignerJwtEntryType + const StaticFileHandlerEntryType + var EventEntryNoop = NewEventEntryNoop() + var EventEntryStdout = NewEventEntryStdout() + var GlobalAppCtx = &appContext + var LoggerEntryNoop = NewLoggerEntryNoop() + var LoggerEntryStdout = NewLoggerEntryStdout() + func BootstrapBuiltInEntryFromYAML(raw []byte) + func BootstrapPluginEntryFromYAML(raw []byte) + func BootstrapUserEntryFromYAML(raw []byte) + func BootstrapWebFrameEntryFromYAML(raw []byte) + func IsValidDomain(domain string) bool + func RegisterAsymmetricJwtSigner(entryName, algo string, privPEM, pubPEM []byte) *asymmetricJwtSigner + func RegisterCertEntryYAML(raw []byte) map[string]Entry + func RegisterConfigEntryYAML(raw []byte) map[string]Entry + func RegisterEventEntryYAML(raw []byte) map[string]Entry + func RegisterLoggerEntryYAML(raw []byte) map[string]Entry + func RegisterPluginRegFunc(regFunc RegFunc) + func RegisterSymmetricJwtSigner(entryName, algo string, rawKey []byte) *symmetricJwtSigner + func RegisterUserEntryRegFunc(regFunc RegFunc) + func RegisterWebFrameRegFunc(regFunc RegFunc) + func ShutdownWithError(err error) + func UnmarshalBootYAML(raw []byte, config interface{}) + type BootCert struct + Cert []*BootCertE + type BootCertE struct + CAPath string + CertPemPath string + Description string + Domain string + KeyPemPath string + Name string + type BootCommonService struct + Enabled bool + PathPrefix string + type BootConfig struct + Config []*BootConfigE + type BootConfigE struct + Content map[string]interface{} + Description string + Domain string + EnvPrefix string + Name string + Path string + type BootDocs struct + Debug bool + Enabled bool + Headers []string + Path string + SpecPath string + Style struct{ ... } + type BootEvent struct + Event []*BootEventE + type BootEventE struct + Default bool + Description string + Domain string + Encoding string + Loki BootLoki + Lumberjack *lumberjack.Logger + Name string + OutputPaths []string + type BootLogger struct + Logger []*BootLoggerE + type BootLoggerE struct + Default bool + Description string + Domain string + Loki BootLoki + Lumberjack *lumberjack.Logger + Name string + Zap *rklogger.ZapConfigWrap + type BootLoki struct + Addr string + Enabled bool + InsecureSkipVerify bool + Labels map[string]string + MaxBatchSize int + MaxBatchWaitMs int + Password string + Path string + Username string + type BootPProf struct + Enabled bool + Path string + type BootProm struct + Enabled bool + Path string + Pusher struct{ ... } + type BootSW struct + Enabled bool + Headers []string + JsonPath string + Path string + type BootStaticFileHandler struct + Enabled bool + Path string + SourcePath string + SourceType string + type CertEntry struct + Certificate *tls.Certificate + RootCA *x509.Certificate + func RegisterCertEntry(boot *BootCert) []*CertEntry + func (entry *CertEntry) Bootstrap(ctx context.Context) + func (entry *CertEntry) GetDescription() string + func (entry *CertEntry) GetName() string + func (entry *CertEntry) GetType() string + func (entry *CertEntry) Interrupt(context.Context) + func (entry *CertEntry) MarshalJSON() ([]byte, error) + func (entry *CertEntry) String() string + func (entry *CertEntry) UnmarshalJSON([]byte) error + type CommonServiceEntry struct + AlivePath string + GcPath string + InfoPath string + ReadyPath string + func RegisterCommonServiceEntry(boot *BootCommonService, opts ...CommonServiceEntryOption) *CommonServiceEntry + func (entry *CommonServiceEntry) Alive(writer http.ResponseWriter, request *http.Request) + func (entry *CommonServiceEntry) Bootstrap(context.Context) + func (entry *CommonServiceEntry) Gc(writer http.ResponseWriter, request *http.Request) + func (entry *CommonServiceEntry) GetDescription() string + func (entry *CommonServiceEntry) GetName() string + func (entry *CommonServiceEntry) GetType() string + func (entry *CommonServiceEntry) Info(writer http.ResponseWriter, request *http.Request) + func (entry *CommonServiceEntry) Interrupt(context.Context) + func (entry *CommonServiceEntry) MarshalJSON() ([]byte, error) + func (entry *CommonServiceEntry) Ready(writer http.ResponseWriter, request *http.Request) + func (entry *CommonServiceEntry) String() string + func (entry *CommonServiceEntry) UnmarshalJSON([]byte) error + type CommonServiceEntryOption func(entry *CommonServiceEntry) + func WithNameCommonServiceEntry(name string) CommonServiceEntryOption + type ConfigEntry struct + EnvPrefix string + Locale string + Path string + func RegisterConfigEntry(boot *BootConfig) []*ConfigEntry + func (entry *ConfigEntry) Bootstrap(context.Context) + func (entry *ConfigEntry) GetDescription() string + func (entry *ConfigEntry) GetName() string + func (entry *ConfigEntry) GetType() string + func (entry *ConfigEntry) Interrupt(context.Context) + func (entry *ConfigEntry) MarshalJSON() ([]byte, error) + func (entry *ConfigEntry) String() string + func (entry *ConfigEntry) UnmarshalJSON([]byte) error + type Crypto interface + Decrypt func(plaintext []byte) ([]byte, error) + Encrypt func(plaintext []byte) ([]byte, error) + type CryptoAESEntry struct + func NewCryptoAES(entryName string, key []byte) (*CryptoAESEntry, error) + func (s *CryptoAESEntry) Bootstrap(ctx context.Context) + func (s *CryptoAESEntry) Decrypt(ciphertext []byte) ([]byte, error) + func (s *CryptoAESEntry) Encrypt(plaintext []byte) ([]byte, error) + func (s *CryptoAESEntry) GetDescription() string + func (s *CryptoAESEntry) GetName() string + func (s *CryptoAESEntry) GetType() string + func (s *CryptoAESEntry) Interrupt(ctx context.Context) + func (s *CryptoAESEntry) String() string + type DocsEntry struct + Debug bool + Headers map[string]string + Path string + SpecPath string + Style struct{ ... } + func RegisterDocsEntry(boot *BootDocs, opts ...DocsEntryOption) *DocsEntry + func (entry *DocsEntry) Bootstrap(ctx context.Context) + func (entry *DocsEntry) ConfigFileHandler() http.HandlerFunc + func (entry *DocsEntry) GetDescription() string + func (entry *DocsEntry) GetName() string + func (entry *DocsEntry) GetType() string + func (entry *DocsEntry) Interrupt(ctx context.Context) + func (entry *DocsEntry) MarshalJSON() ([]byte, error) + func (entry *DocsEntry) String() string + func (entry *DocsEntry) UnmarshalJSON([]byte) error + type DocsEntryOption func(entry *DocsEntry) + func WithNameDocsEntry(name string) DocsEntryOption + type Entry interface + Bootstrap func(context.Context) + GetDescription func() string + GetName func() string + GetType func() string + Interrupt func(context.Context) + String func() string + type EventEntry struct + IsDefault bool + LoggerConfig *zap.Config + LumberjackConfig *lumberjack.Logger + func NewEventEntryNoop() *EventEntry + func NewEventEntryStdout() *EventEntry + func RegisterEventEntry(boot *BootEvent) []*EventEntry + func (entry *EventEntry) AddEntryLabelToLokiSyncer(e Entry) + func (entry *EventEntry) AddLabelToLokiSyncer(k, v string) + func (entry *EventEntry) Bootstrap(ctx context.Context) + func (entry *EventEntry) GetDescription() string + func (entry *EventEntry) GetName() string + func (entry *EventEntry) GetType() string + func (entry *EventEntry) Interrupt(ctx context.Context) + func (entry *EventEntry) MarshalJSON() ([]byte, error) + func (entry *EventEntry) String() string + func (entry *EventEntry) Sync() + func (entry *EventEntry) UnmarshalJSON([]byte) error + type LivenessCheck func(req *http.Request, resp http.ResponseWriter) bool + type LoggerEntry struct + IsDefault bool + LoggerConfig *zap.Config + LumberjackConfig *lumberjack.Logger + func NewLoggerEntryNoop() *LoggerEntry + func NewLoggerEntryStdout() *LoggerEntry + func RegisterLoggerEntry(boot *BootLogger) []*LoggerEntry + func (entry *LoggerEntry) AddEntryLabelToLokiSyncer(e Entry) + func (entry *LoggerEntry) AddLabelToLokiSyncer(k, v string) + func (entry *LoggerEntry) Bootstrap(ctx context.Context) + func (entry *LoggerEntry) GetDescription() string + func (entry *LoggerEntry) GetName() string + func (entry *LoggerEntry) GetType() string + func (entry *LoggerEntry) Interrupt(ctx context.Context) + func (entry *LoggerEntry) MarshalJSON() ([]byte, error) + func (entry *LoggerEntry) String() string + func (entry *LoggerEntry) Sync() + func (entry *LoggerEntry) UnmarshalJSON([]byte) error + type PProfEntry struct + Path string + func RegisterPProfEntry(boot *BootPProf, opts ...PProfEntryOption) *PProfEntry + func (entry *PProfEntry) Bootstrap(ctx context.Context) + func (entry *PProfEntry) GetDescription() string + func (entry *PProfEntry) GetName() string + func (entry *PProfEntry) GetType() string + func (entry *PProfEntry) Interrupt(ctx context.Context) + func (entry *PProfEntry) MarshalJSON() ([]byte, error) + func (entry *PProfEntry) String() string + func (entry *PProfEntry) UnmarshalJSON([]byte) error + type PProfEntryOption func(entry *PProfEntry) + func WithNamePProfEntry(name string) PProfEntryOption + type ProcessInfo struct + AZ string + AppName string + CpuInfo *rkos.CpuInfo + Description string + DocsUrl []string + Domain string + GID string + GoEnvInfo *rkos.GoEnvInfo + HomeUrl string + Keywords []string + Maintainers []string + MemInfo *rkos.MemInfo + NetInfo *rkos.NetInfo + OsInfo *rkos.OsInfo + Realm string + Region string + StartTime string + UID string + UpTimeSec int64 + Username string + Version string + func NewProcessInfo() *ProcessInfo + type PromEntry struct + Gatherer prometheus.Gatherer + Path string + Pusher *PushGatewayPusher + Registerer prometheus.Registerer + func RegisterPromEntry(boot *BootProm, opts ...PromEntryOption) *PromEntry + func (entry *PromEntry) Bootstrap(ctx context.Context) + func (entry *PromEntry) GetDescription() string + func (entry *PromEntry) GetName() string + func (entry *PromEntry) GetType() string + func (entry *PromEntry) Interrupt(ctx context.Context) + func (entry *PromEntry) MarshalJSON() ([]byte, error) + func (entry *PromEntry) RegisterCollectors(collectors ...prometheus.Collector) + func (entry *PromEntry) String() string + func (entry *PromEntry) UnmarshalJSON([]byte) error + type PromEntryOption func(entry *PromEntry) + func WithRegistryPromEntry(registry *prometheus.Registry) PromEntryOption + type PushGatewayPusher struct + IntervalMs time.Duration + JobName string + Pusher *push.Pusher + RemoteAddress string + func (pub *PushGatewayPusher) Bootstrap(ctx context.Context) + func (pub *PushGatewayPusher) Interrupt(ctx context.Context) + type ReadinessCheck func(req *http.Request, resp http.ResponseWriter) bool + type RegFunc func(raw []byte) map[string]Entry + func ListPluginEntryRegFunc() []RegFunc + func ListUserEntryRegFunc() []RegFunc + func ListWebFrameEntryRegFunc() []RegFunc + type SWEntry struct + Headers map[string]string + JsonPath string + Path string + func RegisterSWEntry(boot *BootSW, opts ...SWEntryOption) *SWEntry + func (entry *SWEntry) Bootstrap(ctx context.Context) + func (entry *SWEntry) ConfigFileHandler() http.HandlerFunc + func (entry *SWEntry) GetDescription() string + func (entry *SWEntry) GetName() string + func (entry *SWEntry) GetType() string + func (entry *SWEntry) Interrupt(ctx context.Context) + func (entry *SWEntry) MarshalJSON() ([]byte, error) + func (entry *SWEntry) String() string + func (entry *SWEntry) UnmarshalJSON([]byte) error + type SWEntryOption func(entry *SWEntry) + func WithNameSWEntry(name string) SWEntryOption + type ShutdownHook func() + type SignerJwt interface + Algorithms func() []string + PubKey func() []byte + SignJwt func(claim jwt.Claims) (string, error) + VerifyJwt func(token string) (*jwt.Token, error) + type StaticFileHandlerEntry struct + Path string + Template *template.Template + func RegisterStaticFileHandlerEntry(boot *BootStaticFileHandler, opts ...StaticFileHandlerEntryOption) *StaticFileHandlerEntry + func (entry *StaticFileHandlerEntry) Bootstrap(context.Context) + func (entry *StaticFileHandlerEntry) GetDescription() string + func (entry *StaticFileHandlerEntry) GetFileHandler() http.HandlerFunc + func (entry *StaticFileHandlerEntry) GetName() string + func (entry *StaticFileHandlerEntry) GetType() string + func (entry *StaticFileHandlerEntry) Interrupt(context.Context) + func (entry *StaticFileHandlerEntry) MarshalJSON() ([]byte, error) + func (entry *StaticFileHandlerEntry) String() string + func (entry *StaticFileHandlerEntry) UnmarshalJSON([]byte) error + type StaticFileHandlerEntryOption func(entry *StaticFileHandlerEntry) + func WithNameStaticFileHandlerEntry(name string) StaticFileHandlerEntryOption