Cloudflare Configurator

  • Weii Wang
Channel Revision Published Runs on
latest/edge 2 18 Oct 2024
Ubuntu 24.04
juju deploy cloudflare-configurator --channel edge
Show information

Platform:

Ubuntu
24.04

charms.cloudflare_configurator.v0.cloudflared_route

Interface Library for cloudflared_route.

This library wraps relation endpoints using the cloudflared_route interface and provides a Python API for both requesting and providing cloudflared-route integrations.

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

cd some-charm
charmcraft fetch-lib charms.cloudflare_configurator.v0.cloudflared_route

In the metadata.yaml of the charm, add the following:

requires:
    cloudflared-route:
        interface: cloudflared_route

class InvalidIntegration

Description

Charm received invalid integration data. None

class CloudflaredRouteProvider

Description

cloudflared-route provider. None

Methods

CloudflaredRouteProvider. __init__( self , charm , relation_name: str )

CloudflaredRouteProvider. set_tunnel_token( self , tunnel_token: str , relation )

Set cloudflared tunnel-token in the integration.

Arguments

tunnel_token

The tunnel-token to set.

relation

The relation to set the tunnel-token to, if the relation is None, using the only existing cloudflared-route relation.

CloudflaredRouteProvider. unset_tunnel_token( self , relation )

Unset cloudflared tunnel-token in the integration.

Arguments

relation

The relation to remote the tunnel-token from, if the relation is None, using the only existing cloudflared-route relation.

CloudflaredRouteProvider. set_nameserver( self , nameserver , relation )

Set or unset the nameserver used by the Cloudflared tunnel.

Arguments

nameserver

The nameserver used by the Cloudflared tunnel.

relation

The relation to remote the tunnel-token from, if the relation is None, using the only existing cloudflared-route relation.

class CloudflaredRouteRequirer

Description

cloudflared-route requirer. None

Methods

CloudflaredRouteRequirer. __init__( self , charm , relation_name: str )

CloudflaredRouteRequirer. get_tunnel_token( self , relation )

Get cloudflared tunnel-token from cloudflared-route integrations.

Arguments

relation

relation to receive the tunnel-token from.

Returns

cloudflared tunnel-token.

CloudflaredRouteRequirer. get_nameserver( self , relation )

Get the nameserver used by the Cloudflared tunnel.

Arguments

relation

relation to receive the tunnel-token from.

Returns

the nameserver used by the Cloudflared tunnel.