installers.db.meilisearchinstaller #
meilisearch
To get started
import freeflowuniverse.crystallib.installers.db.meilisearch as meilisearchinstaller
heroscript:='
!!meilisearch.configure name:'test'
masterkey: '1234'
port: 7701
!!meilisearch.start name:'test' reset:1
'
meilisearchinstaller.play(heroscript=heroscript)!
//or we can call the default and do a start with reset
//mut installer:= meilisearch_installer.get()!
//installer.start(reset:true)!
example heroscript
!!meilisearch.configure
name:'default'
path: '{HOME}/hero/var/meilisearch/default'
masterkey: ''
host: 'localhost'
port: 7700
production: 0
Constants #
const version = '1.11.3'
fn get #
fn get(args_ ArgsGet) !&MeilisearchServer
fn heroscript_default #
fn heroscript_default() !string
fn play #
fn play(args_ PlayArgs) !
fn switch #
fn switch(name string)
switch instance to be used for meilisearchinstaller
struct ArgsGet #
@[params]
struct ArgsGet {
pub mut:
name string
}
///////FACTORY
struct InstallArgs #
@[params]
struct InstallArgs {
pub mut:
reset bool
}
struct MeilisearchServer #
struct MeilisearchServer {
pub mut:
name string = 'default'
path string
masterkey string @[secret]
host string
port int
production bool
}
THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED
fn (MeilisearchServer) build #
fn (mut self MeilisearchServer) build() !
fn (MeilisearchServer) destroy #
fn (mut self MeilisearchServer) destroy() !
fn (MeilisearchServer) install #
fn (mut self MeilisearchServer) install(args InstallArgs) !
fn (MeilisearchServer) install_start #
fn (mut self MeilisearchServer) install_start(args InstallArgs) !
fn (MeilisearchServer) reload #
fn (mut self MeilisearchServer) reload() !
load from disk and make sure is properly intialized
fn (MeilisearchServer) restart #
fn (mut self MeilisearchServer) restart() !
fn (MeilisearchServer) running #
fn (mut self MeilisearchServer) running() !bool
fn (MeilisearchServer) start #
fn (mut self MeilisearchServer) start() !
fn (MeilisearchServer) stop #
fn (mut self MeilisearchServer) stop() !
struct PlayArgs #
@[params]
struct PlayArgs {
pub mut:
heroscript string // if filled in then plbook will be made out of it
plbook ?playbook.PlayBook
reset bool
}