server

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "indexer",
	Short: "inscription index server",
	Run: func(cmd *cobra.Command, args []string) {
		if err := IndexSrv(); err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
		<-signal.InterruptHandlersDone
	},
}

Functions

func IndexSrv

func IndexSrv(opts ...SrvOption) error

Types

type SrvOption

type SrvOption func(*config.SrvConfigs)

SrvOption is a function type that takes a pointer to a config.SrvConfigs struct as a parameter. It is used to set the fields of the config.SrvConfigs struct.

func WithEnablePProf

func WithEnablePProf(enablePProf bool) SrvOption

WithEnablePProf is a function that returns a SrvOption. The returned SrvOption sets the enablePProf field of the config.SrvConfigs struct to the provided enablePProf.

func WithMysqlAddr

func WithMysqlAddr(mysqlAddr string) SrvOption

WithMysqlAddr is a function that returns a SrvOption. The returned SrvOption sets the mysqlAddr field of the config.SrvConfigs struct to the provided mysqlAddr.

func WithMysqlDBName

func WithMysqlDBName(mysqlDBName string) SrvOption

WithMysqlDBName is a function that returns a SrvOption. The returned SrvOption sets the mysqlDBName field of the config.SrvConfigs struct to the provided mysqlDBName.

func WithMysqlPassword

func WithMysqlPassword(mysqlPassword string) SrvOption

WithMysqlPassword is a function that returns a SrvOption. The returned SrvOption sets the mysqlPassword field of the config.SrvConfigs struct to the provided mysqlPassword.

func WithMysqlUser

func WithMysqlUser(mysqlUser string) SrvOption

WithMysqlUser is a function that returns a SrvOption. The returned SrvOption sets the mysqlUser field of the config.SrvConfigs struct to the provided mysqlUser.

func WithNoApi

func WithNoApi(noApi bool) SrvOption

WithNoApi is a function that returns a SrvOption. The returned SrvOption sets the noApi field of the config.SrvConfigs struct to the provided noApi.

func WithPassword

func WithPassword(password string) SrvOption

WithPassword is a function that returns a SrvOption. The returned SrvOption sets the password field of the config.SrvConfigs struct to the provided password.

func WithRpcConnect

func WithRpcConnect(rpcConnect string) SrvOption

WithRpcConnect is a function that returns a SrvOption. The returned SrvOption sets the rpcConnect field of the config.SrvConfigs struct to the provided rpcConnect.

func WithRpcListen

func WithRpcListen(rpcListen string) SrvOption

WithRpcListen is a function that returns a SrvOption. The returned SrvOption sets the rpcListen field of the config.SrvConfigs struct to the provided rpcListen.

func WithTestNet

func WithTestNet(testnet bool) SrvOption

WithTestNet is a function that returns a SrvOption. The returned SrvOption sets the testnet field of the config.SrvConfigs struct to the provided testnet.

func WithUserName

func WithUserName(username string) SrvOption

WithUserName is a function that returns a SrvOption. The returned SrvOption sets the username field of the config.SrvConfigs struct to the provided username.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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