Dagger
Search

registry-cache

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/samalba/registry-cache/dagger@v0.1.1

Entrypoint

Return Type
RegistryCache !
Arguments
NameTypeDescription
sockSocket !No description provided
Example
dagger -m github.com/samalba/registry-cache/dagger@916af1af4b4e2541d04d0f3af7257f5d682a3d16 call \
func (m *myModule) example(sock *Socket) *RegistryCache  {
	return dag.
			RegistryCache(sock)
}
@function
def example(sock: dag.Socket) -> dag.RegistryCache:
	return (
		dag.registry_cache(sock)
	)
@func()
example(sock: Socket): RegistryCache {
	return dag
		.registryCache(sock)
}

Types

RegistryCache 🔗

sock() 🔗

Return Type
Socket !
Example
dagger -m github.com/samalba/registry-cache/dagger@916af1af4b4e2541d04d0f3af7257f5d682a3d16 call \
 sock
func (m *myModule) example(sock *Socket) *Socket  {
	return dag.
			RegistryCache(sock).
			Sock()
}
@function
def example(sock: dag.Socket) -> dag.Socket:
	return (
		dag.registry_cache(sock)
		.sock()
	)
@func()
example(sock: Socket): Socket {
	return dag
		.registryCache(sock)
		.sock()
}

dockerClient() 🔗

Return Type
Container !
Example
dagger -m github.com/samalba/registry-cache/dagger@916af1af4b4e2541d04d0f3af7257f5d682a3d16 call \
 docker-client
func (m *myModule) example(sock *Socket) *Container  {
	return dag.
			RegistryCache(sock).
			DockerClient()
}
@function
def example(sock: dag.Socket) -> dagger.Container:
	return (
		dag.registry_cache(sock)
		.docker_client()
	)
@func()
example(sock: Socket): Container {
	return dag
		.registryCache(sock)
		.dockerClient()
}

loadDaggerEngineImage() 🔗

Return Type
String !
Arguments
NameTypeDefault ValueDescription
daggerVersionString !-No description provided
registryMirrorString !-No description provided
Example
dagger -m github.com/samalba/registry-cache/dagger@916af1af4b4e2541d04d0f3af7257f5d682a3d16 call \
 load-dagger-engine-image --dagger-version string --registry-mirror string
func (m *myModule) example(ctx context.Context, sock *Socket, daggerVersion string, registryMirror string) string  {
	return dag.
			RegistryCache(sock).
			LoadDaggerEngineImage(ctx, daggerVersion, registryMirror)
}
@function
async def example(sock: dag.Socket, dagger_version: str, registry_mirror: str) -> str:
	return await (
		dag.registry_cache(sock)
		.load_dagger_engine_image(dagger_version, registry_mirror)
	)
@func()
async example(sock: Socket, daggerVersion: string, registryMirror: string): Promise<string> {
	return dag
		.registryCache(sock)
		.loadDaggerEngineImage(daggerVersion, registryMirror)
}

loadRegistryImage() 🔗

Return Type
String !
Example
dagger -m github.com/samalba/registry-cache/dagger@916af1af4b4e2541d04d0f3af7257f5d682a3d16 call \
 load-registry-image
func (m *myModule) example(ctx context.Context, sock *Socket) string  {
	return dag.
			RegistryCache(sock).
			LoadRegistryImage(ctx)
}
@function
async def example(sock: dag.Socket) -> str:
	return await (
		dag.registry_cache(sock)
		.load_registry_image()
	)
@func()
async example(sock: Socket): Promise<string> {
	return dag
		.registryCache(sock)
		.loadRegistryImage()
}

initRegistryMirror() 🔗

Init the Registry Mirror container

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
storagePathString ""No description provided
Example
dagger -m github.com/samalba/registry-cache/dagger@916af1af4b4e2541d04d0f3af7257f5d682a3d16 call \
 init-registry-mirror
func (m *myModule) example(ctx context.Context, sock *Socket)   {
	return dag.
			RegistryCache(sock).
			InitRegistryMirror(ctx)
}
@function
async def example(sock: dag.Socket) -> None:
	return await (
		dag.registry_cache(sock)
		.init_registry_mirror()
	)
@func()
async example(sock: Socket): Promise<void> {
	return dag
		.registryCache(sock)
		.initRegistryMirror()
}

configureDaggerEngine() 🔗

Configure a new Dagger Engine container

Return Type
String !
Arguments
NameTypeDefault ValueDescription
registryMirrorString "registry-mirror-docker.io:5000"No description provided
Example
dagger -m github.com/samalba/registry-cache/dagger@916af1af4b4e2541d04d0f3af7257f5d682a3d16 call \
 configure-dagger-engine
func (m *myModule) example(ctx context.Context, sock *Socket) string  {
	return dag.
			RegistryCache(sock).
			ConfigureDaggerEngine(ctx)
}
@function
async def example(sock: dag.Socket) -> str:
	return await (
		dag.registry_cache(sock)
		.configure_dagger_engine()
	)
@func()
async example(sock: Socket): Promise<string> {
	return dag
		.registryCache(sock)
		.configureDaggerEngine()
}