Kratos

  • By Identity Charmers
Channel Revision Published Runs on
latest/stable 397 24 Apr 2024
Ubuntu 22.04
latest/edge 402 01 May 2024
Ubuntu 22.04
0.2/stable 399 25 Apr 2024
Ubuntu 22.04
0.2/edge 406 02 May 2024
Ubuntu 22.04
0.1/edge 383 29 Sep 2023
Ubuntu 22.04
juju deploy kratos
Show information

Platform:

charms.kratos.v0.kratos_endpoints

This interface is deprecated in favor of kratos_info. Interface library for sharing kratos endpoints. This library provides a Python API for both requesting and providing public and admin endpoints.

Getting Started

To get started using the library, you need to fetch the library using charmcraft.

cd some-charm
charmcraft fetch-lib charms.kratos.v0.kratos_endpoints

To use the library from the requirer side: In the metadata.yaml of the charm, add the following:

requires:
  kratos-endpoint-info:
    interface: kratos_endpoints
    limit: 1

Then, to initialise the library:

from charms.kratos.v0.kratos_endpoints import (
    KratosEndpointsRelationError,
    KratosEndpointsRequirer,
)
Class SomeCharm(CharmBase):
    def __init__(self, *args):
        self.kratos_endpoints_relation = KratosEndpointsRequirer(self)
        self.framework.observe(self.on.some_event_emitted, self.some_event_function)
    def some_event_function():
        # fetch the relation info
        try:
            kratos_data = self.kratos_endpoints_relation.get_kratos_endpoints()
        except KratosEndpointsRelationError as error:
            ...

class KratosEndpointsRelationReadyEvent

Description

Event to notify the charm that the relation is ready. None

class KratosEndpointsProviderEvents

Description

Event descriptor for events raised by KratosEndpointsProvider. None

class KratosEndpointsProvider

Description

Provider side of the kratos-endpoint-info relation. None

Methods

KratosEndpointsProvider. __init__( self , charm: CharmBase , relation_name: str )

KratosEndpointsProvider. send_endpoint_relation_data( self , admin_endpoint: str , public_endpoint: str )

Description

Updates relation with endpoints info. None

class KratosEndpointsRelationError

Description

Base class for the relation exceptions. None

class KratosEndpointsRelationMissingError

Description

Raised when the relation is missing. None

Methods

KratosEndpointsRelationMissingError. __init__( self )

class KratosEndpointsRelationDataMissingError

Description

Raised when information is missing from the relation. None

Methods

KratosEndpointsRelationDataMissingError. __init__( self , message: str )

class KratosEndpointsRequirer

Description

Requirer side of the kratos-endpoint-info relation. None

Methods

KratosEndpointsRequirer. __init__( self , charm: CharmBase , relation_name: str )

KratosEndpointsRequirer. get_kratos_endpoints( self )

Description

Get the kratos endpoints. None