config

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AgentEnabled bool
	AgentOpts    *agent.Opts

	Addrs    []string
	GRPCHost string
	GRPCPort int

	Replicas             int
	CheckIndexInterval   time.Duration
	CreateIndexThreshold int

	SearchResultInterceptor *lua.LFunction
	SearchQueryInterceptor  *lua.LFunction
	InsertDataInterceptor   *lua.LFunction
}

func New

func New(opts ...OptionFunc) (*Config, error)

type OptionFunc

type OptionFunc func(c *Config) error

func WithAddrs added in v0.0.8

func WithAddrs(addrs []string) OptionFunc

func WithAgentEnabled

func WithAgentEnabled(enabled bool) OptionFunc

func WithAgentOpts

func WithAgentOpts(opts *agent.Opts) OptionFunc

func WithCheckIndexInterval

func WithCheckIndexInterval(s string) OptionFunc

func WithCreateIndexThreshold

func WithCreateIndexThreshold(n uint) OptionFunc

func WithGRPCHost

func WithGRPCHost(host string) OptionFunc

func WithGRPCPort

func WithGRPCPort(port uint) OptionFunc

func WithInsertDataInterceptor added in v0.1.1

func WithInsertDataInterceptor(idi *lua.LFunction) OptionFunc

func WithReplicas

func WithReplicas(n uint) OptionFunc

func WithSearchQueryInterceptor added in v0.1.1

func WithSearchQueryInterceptor(sqi *lua.LFunction) OptionFunc

func WithSearchResultInterceptor added in v0.1.1

func WithSearchResultInterceptor(sri *lua.LFunction) OptionFunc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL