jujuconn

package module
v0.0.0-...-f64633d Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Overview

Package jujuconn implements some convenience methods for making connections to the Juju API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialController

func DialController(controller string) (api.Connection, error)

func DialModel

func DialModel(controller, model string) (api.Connection, error)

func Init

func Init() error

Init initializes juju global variables once only.

Types

type Context

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

func NewContext

func NewContext() (*Context, error)

func NewContextWithParams

func NewContextWithParams(p Params) (*Context, error)

func (*Context) Close

func (ctxt *Context) Close() error

func (*Context) ControllerDialer

func (ctxt *Context) ControllerDialer(controller string) (*Dialer, error)

func (*Context) DialController

func (ctxt *Context) DialController(controller string) (api.Connection, error)

DialController makes a controller-only connection to the controller with the given name. If the name is empty, the current controller will be used.

func (*Context) DialModel

func (ctxt *Context) DialModel(controller, model string) (api.Connection, error)

DialModel makes an API connection to the given controller and model names. If the controller name is empty, the default controller will be used. If the model name is empty, the default model for the selected controller will be used.

The model name may also be provided as a UUID.

func (*Context) ModelDialer

func (ctxt *Context) ModelDialer(controller, model string) (*Dialer, error)

type Dialer

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

func (*Dialer) Dial

func (d *Dialer) Dial() (api.Connection, error)

type Params

type Params struct {
	BakeryClient *httpbakery.Client
}

Jump to

Keyboard shortcuts

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