gologic

package module
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: Apache-2.0 Imports: 9 Imported by: 1

README

gologic

Features

  • Get status of Admin and Managed Server
  • Simple commands to start and stop Managed Server
  • Specify a list of Servers
  • Print informations about Weblogic Server
Supported Go Versions

Gologic was build on Version:

  • 1.14.3

Build

With this command you can build this project:

go build gologic.go AdminServer.go ManagedServer.go

Installation

You need to create a config file at /etc/gologic.conf.
With the followed content:

{
    "ip": "127.0.0.1",
    "port": 7001,
    "username": "admin",
    "password": "securepassword",
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminServer

type AdminServer struct {
	Cli         *resty.Client
	ManagedList map[string]*ManagedServer
	// contains filtered or unexported fields
}

AdminServer is a struct, which represents the Weblogic AdminServer. name: is the Admin Server Name ipAdress: is the IPv4 Address of the Server username: username of a Administration Account password: its the password of the account

func LoginAdminServer added in v1.0.5

func LoginAdminServer(ip string, port int, username string, password string) AdminServer

LoginAdminServer checks the connection to the AdminServer and it collect a list of ManagedServer from the AdminServer

func (*AdminServer) CreateManagedServer

func (admin *AdminServer) CreateManagedServer(name string, listenAddress string, listenPort string)

CreateManagedServer creates a ManagedServer with the parameter name (name of the server), listenAddress, listenPort

func (*AdminServer) Deploy

func (admin *AdminServer) Deploy(target []string, pathSlice []string)

Deploy a Java Application to a specific cluster or server

func (*AdminServer) GetStatus

func (admin *AdminServer) GetStatus() string

GetStatus returns the AdminServer Status with color

func (*AdminServer) PrintDeployments

func (admin *AdminServer) PrintDeployments(brief bool)

PrintDeployments prints a list of Deployments

func (*AdminServer) PrintInfo

func (admin *AdminServer) PrintInfo()

PrintInfo prints informations about the AdminServer

func (*AdminServer) PrintStatus

func (admin *AdminServer) PrintStatus(nameList []string)

PrintStatus prints the status of all Servers or a list of specific servers

func (*AdminServer) Start

func (admin *AdminServer) Start(nameList []string)

Start starts a list of ManagedServer or when the list is empty, its stops every ManagedServer

func (*AdminServer) Stop

func (admin *AdminServer) Stop(nameList []string, force bool)

Stop stops a list of servers or when the list is empty, its stops every ManagedServer

type ManagedServer

type ManagedServer struct {
	Name   string
	Status string
	Cli    *resty.Client
}

ManagedServer is a a struct to save Weblogic ManagedServer Name: It has a name Status: And a status with color (Running, Shutdown...)

func (*ManagedServer) ForceStopMS added in v1.0.5

func (ms *ManagedServer) ForceStopMS() error

func (*ManagedServer) GetStatus

func (ms *ManagedServer) GetStatus() string

GetStatus returns the status of the ManagedServer with colors

func (*ManagedServer) StartMS

func (ms *ManagedServer) StartMS() error

StartMS starts a list of ManagedServer, when its empty then its starts all ManagedServer

func (*ManagedServer) StopMS

func (ms *ManagedServer) StopMS() error

StopMS stops a list of ManagedServer, when its empty then its Stops all ManagedServer

Jump to

Keyboard shortcuts

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