This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Jumper} from "svelte-loading-spinners"; | |
import {DISCORD_LOGIN_URI} from "$lib/api/config"; | |
import {onMount} from "svelte"; | |
import {ALLOWED_ORIGIN, flags} from "../../lib/api/config.js"; | |
import {extractUserData, requestUserAccess} from "../../lib/api/auth.js"; | |
import {accessToken, currentUser} from "../../lib/stores/auth.js"; | |
import {goto} from "$app/navigation"; | |
import Primary from "../../lib/compontents/buttons/Primary.svelte"; | |
import Secondary from "../../lib/compontents/buttons/Secondary.svelte"; | |
import {writable} from "svelte/store"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io; | |
use std::path::{Path, PathBuf}; | |
use std::sync::Arc; | |
use std::time::{Duration, Instant}; | |
use ahash::{HashMap, HashMapExt, HashSet}; | |
use parking_lot::Mutex; | |
use tokio::task::JoinHandle; | |
use crate::backends::ReadBuffer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import os | |
import time | |
import cv2 | |
import numpy | |
import pygame | |
import shutil | |
from threading import Thread | |
from queue import Queue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import os | |
import time | |
import cv2 | |
import numpy | |
import pygame | |
import shutil | |
from threading import Thread | |
from queue import Queue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use anyhow::Result; | |
use std::net::SocketAddr; | |
use datacake_eventual_consistency::EventuallyConsistentStoreExtension; | |
use datacake_node::{ | |
ConnectionConfig, | |
Consistency, | |
DCAwareSelector, | |
DatacakeNodeBuilder, | |
}; | |
use datacake_sqlite::SqliteStorage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::net::SocketAddr; | |
use datacake_node::{Consistency, ConnectionConfig, DCAwareSelector, DatacakeNodeBuilder}; | |
use datacake_eventual_consistency::test_utils::MemStore; | |
use datacake_eventual_consistency::EventuallyConsistentStoreExtension; | |
async fn main() -> anyhow::Result<()> { | |
let addr = "127.0.0.1:8080".parse::<SocketAddr>().unwrap(); | |
let connection_cfg = ConnectionConfig::new(addr, addr, Vec::<String>::new()); | |
let node = DatacakeNodeBuilder::<DCAwareSelector>::new(1, connection_cfg) | |
.connect() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::net::SocketAddr; | |
use bytecheck::CheckBytes; | |
use datacake_rpc::{ | |
Channel, | |
Handler, | |
Request, | |
RpcClient, | |
RpcService, | |
Server, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use datacake_node::{ClusterExtension, DatacakeNode}; | |
use async_trait::async_trait; | |
pub struct MyExtension; | |
#[async_trait] | |
impl ClusterExtension for MyExtension { | |
type Output = (); | |
type Error = MyError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::net::SocketAddr; | |
use datacake_node::{ConnectionConfig, DCAwareSelector, DatacakeNodeBuilder}; | |
#[tokio::main] | |
async fn main() -> anyhow::Result<()> { | |
let bind_addr = "127.0.0.1:8000".parse::<SocketAddr>().unwrap(); | |
// We setup our connection config for the node passing in the bind address, public address and seed nodes. | |
// Here we're just using the bind address as our public address with no seed, but in the real world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use datacake_node::{ClusterExtension, DatacakeNode}; | |
use async_trait::async_trait; | |
pub struct MyExtension; | |
#[async_trait] | |
impl ClusterExtension for MyExtension { | |
type Output = (); | |
type Error = MyError; |
NewerOlder