Documentation ¶
Index ¶
- type Configuration
- type Service
- func (s *Service) ApplyConfiguration(config interface{}) error
- func (s *Service) CheckConfiguration(config interface{}) error
- func (s *Service) Init(config interface{}) (cdsclient.ServiceConfig, error)
- func (s Service) Repo(op sdk.Operation) *sdk.OperationRepo
- func (s *Service) Serve(c context.Context) error
- func (s *Service) Status(ctx context.Context) *sdk.MonitoringStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Name string `toml:"name" comment:"Name of this CDS Repositories Service\n Enter a name to enable this service" json:"name"` Basedir string `toml:"basedir" comment:"Root directory where the service will store all checked-out repositories" json:"basedir"` OperationRetention int `toml:"operationRetention" comment:"Operation retention in redis store (in days)" default:"5" json:"operationRetention"` RepositoriesRetention int `toml:"repositoriesRetention" comment:"Re retention on the filesystem (in days)" default:"10" json:"repositoriesRetention"` HTTP service.HTTPRouterConfiguration `toml:"http" comment:"######################\n CDS Repositories HTTP Configuration \n######################" json:"http"` URL string `default:"http://localhost:8085" json:"url"` API service.APIServiceConfiguration `toml:"api" comment:"######################\n CDS API Settings \n######################" json:"api"` Cache struct { TTL int `toml:"ttl" default:"60" json:"ttl"` Redis struct { Host string `` /* 192-byte string literal not displayed */ Password string `toml:"password" json:"-"` DbIndex int `toml:"dbindex" default:"0" json:"dbindex"` } `toml:"redis" json:"redis"` } `toml:"cache" comment:"######################\n CDS Repositories Cache Settings \n######################" json:"cache"` }
Configuration is the vcs configuration structure
type Service ¶
type Service struct { service.Common Cfg Configuration Router *api.Router Cache cache.Store // contains filtered or unexported fields }
Service is the repostories service
func (*Service) ApplyConfiguration ¶
ApplyConfiguration apply an object of type repositories.Configuration after checking it
func (*Service) CheckConfiguration ¶
CheckConfiguration checks the validity of the configuration object
func (Service) Repo ¶
func (s Service) Repo(op sdk.Operation) *sdk.OperationRepo
Repo retiens a sdk.OperationRepo from an sdk.Operation
Click to show internal directories.
Click to hide internal directories.