Documentation ¶
Index ¶
Constants ¶
const ( // SUPERVISED sets the runtime mode as supervised threads. SUPERVISED = iota // UNSUPERVISED sets the runtime mode as a single thread. UNSUPERVISED )
Variables ¶
This section is empty.
Functions ¶
func BindEnv ¶ added in v1.16.0
func BindEnv(c *gofig.Config, bindings []shared.EnvBinding) error
BindEnv takes a config `c` and a EnvBinding and binds the values from the environment to the address location in cfg.
func BindSourcesToStructs ¶ added in v1.16.0
BindSourcesToStructs assigns any config value from a config file / env variable to struct `dst`. Its only purpose is to solely modify `dst`, not dealing with the config structs; and do so in a thread safe manner.
func DefaultConfigSources ¶ added in v1.16.0
DefaultConfigSources returns a slice with matched expected config files. It sugars coat several aspects of config file management by assuming there are 3 default locations a config file could be. It uses globbing to match a config file by name, and retrieve any supported extension supported by our drivers. It sanitizes the output depending on the list of drivers provided.
Types ¶
type Config ¶
type Config struct { *shared.Commons `ocisConfig:"shared"` Tracing shared.Tracing `ocisConfig:"tracing"` Log *shared.Log `ocisConfig:"log"` Mode Mode // DEPRECATED File string OcisURL string `ocisConfig:"ocis_url"` Registry string `ocisConfig:"registry"` TokenManager TokenManager `ocisConfig:"token_manager"` Runtime Runtime `ocisConfig:"runtime"` Audit *audit.Config `ocsiConfig:"audit"` Accounts *accounts.Config `ocisConfig:"accounts"` GLAuth *glauth.Config `ocisConfig:"glauth"` Graph *graph.Config `ocisConfig:"graph"` GraphExplorer *graphExplorer.Config `ocisConfig:"graph_explorer"` IDP *idp.Config `ocisConfig:"idp"` IDM *idm.Config `ocisConfig:"idm"` Nats *nats.Config `ocisConfig:"nats"` Notifications *notifications.Config `ocisConfig:"notifications"` OCS *ocs.Config `ocisConfig:"ocs"` Web *web.Config `ocisConfig:"web"` Proxy *proxy.Config `ocisConfig:"proxy"` Settings *settings.Config `ocisConfig:"settings"` Storage *storage.Config `ocisConfig:"storage"` Store *store.Config `ocisConfig:"store"` Thumbnails *thumbnails.Config `ocisConfig:"thumbnails"` WebDAV *webdav.Config `ocisConfig:"webdav"` }
Config combines all available configuration parts.
func DefaultConfig ¶ added in v1.16.0
func DefaultConfig() *Config
type Runtime ¶
type Runtime struct { Port string `ocisConfig:"port" env:"OCIS_RUNTIME_PORT"` Host string `ocisConfig:"host" env:"OCIS_RUNTIME_HOST"` Extensions string `ocisConfig:"extensions" env:"OCIS_RUN_EXTENSIONS"` }
Runtime configures the oCIS runtime when running in supervised mode.
type TokenManager ¶
type TokenManager struct {
JWTSecret string `ocisConfig:"jwt_secret" env:"OCIS_JWT_SECRET"`
}
TokenManager is the config for using the reva token manager