status

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package status provides functionality for ...

Index

Constants

This section is empty.

Variables

View Source
var RPC = struct {
	RpcService struct{ Status string }
}{
	RpcService: struct{ Status string }{
		Status: "status",
	},
}

Functions

func RegisterService

func RegisterService(ctx *cli.Context, baseService service.Service) (service.Service, error)

RegisterService registers the ACL service with the provided CLI context and base service.

It initializes a new ACL service instance and returns it as a service.Service interface.

Types

type OperationalStatus

type OperationalStatus string
var (
	Operational OperationalStatus = "operational"
	Degraded    OperationalStatus = "degraded"
	Foobar      OperationalStatus = "foobar"
)

func (OperationalStatus) String

func (o OperationalStatus) String() string

type RpcService

type RpcService struct {
	zenrpc.Service // Embeds the zenrpc.Service for JSON-RPC functionality.
	// contains filtered or unexported fields
}

RpcService struct represents the RPC service for ACL operations.

func (RpcService) Invoke

func (s RpcService) Invoke(ctx context.Context, w http.ResponseWriter, method string, params json.RawMessage) zenrpc.Response

Invoke is as generated code from zenrpc cmd

func (RpcService) SMD

func (RpcService) SMD() smd.ServiceInfo

func (RpcService) Status

func (s RpcService) Status(ctx context.Context) (*Status, *zenrpc.Error)

type Service

type Service struct {
	*service.BaseService
	// contains filtered or unexported fields
}

Service represents the ACL service for managing access control lists.

func NewService

func NewService(ctx *cli.Context, baseService *service.BaseService) (*Service, error)

NewService creates a new instance of the ACL service.

It initializes the service with the provided CLI context and base service. The ACL service registers GRPC server ACL middleware and namespaces for RPC.

func (*Service) Dependencies

func (s *Service) Dependencies() map[service.DependencyName]service.Option

Dependencies returns the dependencies required by the ACL service.

func (*Service) RegisterNamespaces

func (s *Service) RegisterNamespaces() error

RegisterNamespaces registers RPC namespaces for the ACL service.

It registers the "acl" namespace with the RpcService instance.

func (*Service) Start

func (s *Service) Start(network utils.Network, networkId utils.NetworkID) error

Start starts the ACL service.

This method does nothing at the moment and may not perform any actions in the future.

func (*Service) Stop

func (s *Service) Stop() error

Stop stops the ACL service.

This method does nothing at the moment and may not perform any actions in the future.

type Status

type Status struct {
	NetworkStatus  OperationalStatus `json:"status"`
	ServicesStatus OperationalStatus `json:"services_status"`
}

Jump to

Keyboard shortcuts

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