slave

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetConf = func() *Config {
	if sconf == nil {
		sconf = &Config{}

		err := json.Unmarshal(conf.ReadConf(), sconf)
		if err != nil {
			log.Fatal("Failed to unmarshal slave driver config: ", err)
		}

		SetDefaults()
	}

	return sconf
}

Variable so we can override

Functions

func SetDefaults

func SetDefaults()

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewSlaveClient

func NewSlaveClient() (*Client, error)

func (*Client) CreateMW

func (c *Client) CreateMW(_ context.Context, _ *storage.MW) (string, error)

func (*Client) DeleteMW

func (c *Client) DeleteMW(_ context.Context, _ string) error

func (*Client) GetAllActive

func (c *Client) GetAllActive(_ context.Context) ([]*storage.MW, error)

func (*Client) GetMWByAPIID

func (c *Client) GetMWByAPIID(_ context.Context, _ string) (*storage.MW, error)

GetMWByAPIID is not yet implemented.

func (*Client) GetMWByID

func (c *Client) GetMWByID(_ context.Context, id string) (*storage.MW, error)

func (*Client) InitMservStore

func (c *Client) InitMservStore(_ context.Context, tag string) error

func (*Client) UpdateMW

func (c *Client) UpdateMW(_ context.Context, _ *storage.MW) (string, error)

type Config

type Config struct {
	ServiceStore map[string]*StoreConf
}

type StoreConf

type StoreConf struct {
	ConnStr string
	Secret  string
}

Jump to

Keyboard shortcuts

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